正则表达式 [:graph:] 含义

[:graph:]

代表printable and visible的字符,是除空格符(空格键与[TAB]键)之外的所有按键,

控制字符不算[:graph:]

 

https://www.regular-expressions.info/posixbrackets.html

 

 

POSIXDescriptionASCIIUnicodeShorthandJava
[:alnum:]Alphanumeric characters[a-zA-Z0-9][\p{L&}\p{Nd}] \p{Alnum}
[:alpha:]Alphabetic characters[a-zA-Z]\p{L&} \p{Alpha}
[:ascii:]ASCII characters[\x00-\x7F]\p{InBasicLatin} \p{ASCII}
[:blank:]Space and tab[ \t][\p{Zs}\t]\h\p{Blank}
[:cntrl:]Control characters[\x00-\x1F\x7F]\p{Cc} \p{Cntrl}
[:digit:]Digits[0-9]\p{Nd}\d\p{Digit}
[:graph:]Visible characters (i.e. anything except spaces, control characters, etc.)[\x21-\x7E][^\p{Z}\p{C}] \p{Graph}
[:lower:]Lowercase letters[a-z]\p{Ll} \p{Lower}
[:print:]Visible characters and spaces (i.e. anything except control characters, etc.)[\x20-\x7E]\P{C} \p{Print}
[:punct:]Punctuation and symbols.[!"#$%&'()*+,
 \-./:;<=>?@
 [\\\]^_`{|}~]
[\p{P}\p{S}] \p{Punct}
[:space:]All whitespace characters, including line breaks[ \t\r\n\v\f][\p{Z}\t\r\n\v\f]\s\p{Space}
[:upper:]Uppercase letters[A-Z]\p{Lu} \p{Upper}
[:word:]Word characters (letters, numbers and underscores)[A-Za-z0-9_][\p{L}\p{N}\p{Pc}]\w 
[:xdigit:]Hexadecimal digits[A-Fa-f0-9][A-Fa-f0-9] \p{XDigit}

转载于:https://www.cnblogs.com/Jordandan/p/11211729.html

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值