jflex - Regex to match string literal with newline and carriage return -
i'm having difficulty matching string literal both newline(\n) , carriage return(\r) characters. example:
"132 holt court, cashtown, rhode island, 7680 \n\r"
what tried
\"([^\\\"]|\\.)*\"
but regex can match string above without \r
. can me one?
thank you.
you can remove them first before check .
for example:
string s = "132 holt court, cashtown, rhode island, 7680 \n\r" s=s.replace("\\n\\r","\\n");
Comments
Post a Comment