[:digit:] 或\\d
|
数字; [0-9]
|
[^[:digit:]] 或\\D
|
非数字; 等价于[^0-9]
|
[:lower:] |
小写字母; [a-z]
|
[:upper:] |
大写字母; [A-Z]
|
[:alpha:] |
字母; [a-z] 及[A-Z]
|
[:alnum:] |
所有字母及数字; [A-z0-9]
|
\\w |
字符串; [A-z0-9_] (在ASCII编码下,\w 比[:alnum:] 多了一个下划线) |
[:xdigit:] 或\\x
|
十六进制数字; [0-9A-Fa-f]
|
[:punct:] |
标点符号; ! " ' # $ % & ^ () * + 等 |
[:graph:] |
Graphical characters,即[:alnum:] 和[:punct:]
|
[:blank:] |
空字符; 即Space和Tab |
[:space:] 或\\s
|
Space,Tab,newline,及其他space characters |
[:print:] |
可打印的字符,即:[:alnum:] ,[:punct:] 和[:space:]
|
------- |
-------- |
\\b |
Empty string at either edge of a word(单词开头或结束的位置) |
\\B |
Not the edge of a word(非单词开头或结束的位置) |
\\< |
Beginning of a Word(单词开头的位置) |
\\> |
End of a word(单词结束的位置) |