I think some slight typos mean it doesn't work for anything, but it was very close to functional for the intended change (match single line, and multi-line nested {}'s?). My mod breaks right now because it no longer matches my single line, and far as I can tell it won't match multi-line either in current state. The following works much better in my tests:
regex_string_dictionary["VAR"] = "(var.*=)\\s+(([\\{\\[][\n\r]+[\\S\\s]*?[\r\n]+[\\}\\]]([\r\n]+|\\Z))|([^\n\r]*))"
Matches any single-line var, and matches any var blah = { until it hits a single line with only }
Here's an example of me debugging it: https://regex101.com/r/J9P2g2/4
Also requires some tweaks to later code, otherwise it's stripping {}'s and inserting too many lines. Here's a pastebin of entire modified modpanel.gd that works, with updated regex and later code.
i've tested this with my mod, and a test mod to insert into the races variable.