以下是在java中使用正则表达式匹配Unicode字符类的各种示例.
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. |