admin管理员组文章数量:1406924
Is it possible in the current version of JFlex (1.9.1) to represent a range of full Unicode values in a regular expression ?
Something like this:
UnicodeIdentifier = [a-zA-Z_\u007F-\u10FFFF] [a-zA-Z0-9_\u007F-\u10FFFF]*
except this does not work (and makes JFlex emit a warning) because Unicode escape sequences in Java must be 16 bits in hexadecimal so the high end would be treated as \u10FF
.
The spec says that representing supplementary characters in the range U+010000 to U+10FFFF requires two consecutive Unicode escapes however using this:
UnicodeIdentifier = [a-zA-Z_\u007F-\uDBFF\uDFFF] [a-zA-Z0-9_\u007F-\uDBFF\uDFFF]*
does not work either.
本文标签: javahow to represent full Unicode range in regexp in JFlexStack Overflow
版权声明:本文标题:java - how to represent full Unicode range in regexp in JFlex? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744935962a2633186.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论