Matching JAVA Character Classes


Advertisements


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

Sr.No Construct & Matches
1 \p{javaLowerCase}

Equivalent to java.lang.Character.isLowerCase().

2 \p{javaUpperCase}

Equivalent to java.lang.Character.isUpperCase().

3 \p{javaWhitespace}

Equivalent to java.lang.Character.isWhitespace().

4 \p{javaMirrored}

Equivalent to java.lang.Character.isMirrored().



Advertisements