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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -