ID:2169904
 
(See the best response by Lummox JR.)
Code:
var/regex/r1 = regex("\\n\\n\\(1,1,1\\)\\s*?=\\s*?{\"", "gm") //differentiate between tile definitions and the tilemap

Runtime on this line:
runtime error: Regex fail: nested *?+

Problem description:
Regex's in this language are going to be the death of me. I love to use them but the syntax being different do to additional backslashes is killing me. The normal pattern for the above regex is:
\n\n\(1,1,1\)\s*?=\s*?{\"
I am using it to distinguish between the two parts of a dmm file with the 2 character grid and the two character defines themselves. Where is my regex wrong and why? I've tested the latter pattern here and it works fine.
Try regex("\\n\\n\\(1,1,1\\)\\s*?=\\s*?{\\\"", "gm")
Best response
{ needs to be escaped.
OF COURSE!
so
var/regex/r1 = regex("\\n\\n\\(1,1,1\\)\\s*?=\\s*?\\{\"", "gm")

?