使用Pattern.CANON_EQ编译的正则表达式没有限制。然而,
Pattern.compile("(?:\u00e9)",Pattern.CANON_EQ);抛出异常:
java.util.regex.PatternSyntaxException: Unmatched closing ')' near index 11
((?:é)|é)|e)́)
^请注意,该模式是规范化字符串。它看起来像是JRE中的一个bug,但我在问题跟踪器中找不到这样的bug。
发布于 2012-02-14 00:28:09
看起来是这样的:http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4867170
https://stackoverflow.com/questions/9263673
复制相似问题