I’m trying to parse a compile string using
findRegexp to detect all instances of Symbol plus any methods called on those Symbols and any values passed as arguments to those method calls.
I’m pretty clear on how to write the actual regex, but I’ve run into an embarrassingly basic sclang issue while implementing my String parsing Function: how to match an actual backslash character in a String?
Consider this string:
~str = "This String contains the Symbol \\foo, among other things."
Intuitively, I’d assume that we could match
In other words, one backslash for the String escape, another for the regex escape, and a third for the literal backslash. That’s not the case, though – the above expression returns an empty Array.
Any thoughts on what I’m missing here would be very much appreciated!