java - android regex odd behavior -


what error following regular expression? working fine in java whereas android throws "pattern syntax exception".

         "((?<==)+(\"[^\"]+\"|[^,=+<>#;\r\n]+))" 

avinash raj pointed important mistake: + multiplier after positive lookbehind expression.

using nested marking groups mistake. outer parentheses useless here , should removed reduce complexity.

and backslashes in strings must escaped backslashes. think \r , \n should passed regular expression engine , not characters code value 13 , 10, string use is

"(?<==)(\"[^\"]+\"|[^,=+<>#;\\r\\n]+)" 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -