/world/New()
var/regex/trimQuotesRegex = new/regex({"^\[\\s\n]+"?|"?\[\\s\n]+$|^"|"$"}, "g")
var/string = {" "name" "}
var/trimmed = trimQuotesRegex.Replace(string, "")
var/obj/o = new
o.vars[trimmed] = "meme object"
world.log << "[o]"
It seems like trimmed has the value "name " instead of the more sensible "name", but I can't see any obvious reason as to why.
The above should be returning three matches.
I'm getting zero.