Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does `Pattern.compile("(?:\u00e9)",Pattern.CANON_EQ)` throw?

Tags:

java

unicode

There's no limitation on the regular expression compiled with the Pattern.CANON_EQ. However

Pattern.compile("(?:\u00e9)",Pattern.CANON_EQ);

throws an exception:

java.util.regex.PatternSyntaxException: Unmatched closing ')' near index 11
((?:é)|é)|e)́)
       ^

Note that the pattern is the normalized string. It looks like a bug in JRE, but I can't find such a bug in the issue tracker.

like image 511
Elazar Leibovich Avatar asked Feb 13 '12 16:02

Elazar Leibovich


1 Answers

Seems it's this: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4867170

like image 170
pingw33n Avatar answered Oct 22 '22 03:10

pingw33n