English 中文(简体)
Java Regex - Characters
  • 时间:2024-12-22

Java Regex - Examples Matching Characters


Previous Page Next Page  

Following are various examples of matching characters using regular expression in java.

Sr.No Construct & Matches
1 x

The character x

2 \

The backslash character

3 n

The character with octal value 0n (0 ≤ n ≤ 7)

4 nn

The character with octal value 0nn (0 ≤ n ≤ 7)

5 mnn

The character with octal value 0mnn (0 ≤ m ≤ 3, 0 ≤ n ≤ 7)

6 xhh

The character with hexadecimal value 0xhh

7 uhhhh

The character with hexadecimal value 0xhhhh

8

The tab character ( u0009 )

9

The newpne (pne feed) character ( u000A )

10

The carriage-return character ( u000D )

11 f

The form-feed character ( u000C )

Advertisements