maybe Regex issue with escaped characters
You are probably fighting JMP's escaping getting mixed up with regex escaping @paul_vezzetti .
JMP strings make a special case of \[ and ]\ anywhere in a JMP string to turn off JMP's escaping.
try \!\[ and just use a bare ] . Regex should not need to escape the ] unless it is in a [character class].
regex("[1 2 3]","\!\[(.*)]","\1")
"1 2 3"
\!\ is JMP's escape to make a literal backslash. Regex then sees the \[ and behaves as expected.
Alternatively, you could use the \[ ... ]\ , but it creates worse problems if you actually need ]\ in the regex and seems less clear:
regex("[1 2 3]","\[\[(.*)]]\","\1")
I hope JMP gets a regex-quoted string to solve this double escaping issue.
Craige