📅  最后修改于: 2020-11-14 10:19:42             🧑  作者: Mango
以下是在Java中使用正则表达式匹配字符的各种示例。
Sr.No | Construct & Matches |
---|---|
1 | x
The character x |
2 | \\
The backslash character |
3 | \0n
The character with octal value 0n (0 ≤ n ≤ 7) |
4 | \0nn
The character with octal value 0nn (0 ≤ n ≤ 7) |
5 | \0mnn
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 | \t
The tab character (‘\u0009’) |
9 | \n
The newline (line feed) character (‘\u000A’) |
10 | \r
The carriage-return character (‘\u000D’) |
11 | \f
The form-feed character (‘\u000C’) |