There are no restrictions on the regular expression compiled using 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 a normalized string. This seems like a bug in the JRE, but I cannot find such a bug in the problem tracker.
source share