I want to write a parser rule to parse a valid String
, my rule goes like this:
STRING: '"' [\s\S]+ '"';
But it gives me a warning saying invalid escape sequence \s
. I tried other escape sequence like \t
, \n
... they are all fine.
Can anyone tell me what's going on? \s\S
is not supported? What alternatives can I find for parse a valid String
?
Thanks!