Javaregex 简明教程
Matching Unicode Character Classes
以下是使用正则表达式在 Java 中匹配 Unicode 字符类的各种示例。
Following are various examples of matching Unicode character classes using regular expression in java.
Sr.No |
Construct & Matches |
1 |
\p{IsLatin}A Latin script character. |
2 |
\p{InGreek}A character in the Greek block. |
3 |
\p{Lu}An uppercase letter. |
4 |
\p{IsAlphabetic}An alphabetic character (binary property). |
5 |
\p{Sc}A currency symbol. |
6 |
\P{InGreek}Any character except one in the Greek block. |
7 |
[\p{L}&&[^\p{Lu}]]Any letter except an uppercase letter. |