Flee
Flee copied to clipboard
Unexpected Token Error if there is a "\" in a string
I am trying to parse some URL's into function arguments however as some contain backslashes FLEE throws a Unexpected character exception
Could you please provide example code?
An example is this function as a string with the regular expression as a parameter. The \s is escaped because it's in a string inside my unit test. This will fail with the error about the unexpected token.
"RegExToColumns(CallRole,\"([A-Za-z]+)\\s([a-zA-Z0-9 ]+)\",\"1:CallRollSplit\")"
To get around this though, you have to double escape the slash inside the string literal.
"RegExToColumns(CallRole,\"([A-Za-z]+)\\\\s([a-zA-Z0-9 ]+)\",\"1:CallRollSplit\")"