POSIX字符类

POSIX字符类需要用引号,或双括号[[]]括起来:

[:alnum:]:匹配字面和数字字符。等同于A~Z,a~z,0~9
[:alpha:]:匹配字母字符。等同于A~Z,a~z
[:blank:]:匹配空格或制表符
[:cntrl:]:匹配控制字符
[:digit:]:匹配十进制数字。等同于0~9
[:graph:]:匹配ASCII码值范围33~126的字符。与[:print:]相似,但不包括空格字符
[:print:]:与[:graph:]相同,但多了空格字符
[:lower:]:匹配小写字母,等同于a~z
[:upper:]:匹配大写字母,等同于A~Z
[:space:]:匹配空白字符(空格和制表符)
[:xdigit:]:匹配十六进制数字。等同于0~9,A~F,a~f
上一篇:复制url事故:出现特殊的字符%E2%80%8B


下一篇:Maven-010-maven 编译报错:Failure to ... in ... was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced.