Unicode Character Classes

Following are various examples of matching Unicode character classes using regular expression in java.

Sr.NoConstruct & 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.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *