Created
March 7, 2016 08:45
-
-
Save lanrion/7babeaf73fe899dd701a to your computer and use it in GitHub Desktop.
正则表达式
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.jb51.net/article/43190.htm | |
[...] 位于括号之内的任意字符 | |
[^...] 不在括号之中的任意字符 | |
. 除了换行符之外的任意字符,等价于[^\n] | |
\w 任何单字字符, 等价于[a-zA-Z0-9] | |
\W 任何非单字字符,等价于[^a-zA-Z0-9] | |
\s 任何空白符,等价于[\ t \ n \ r \ f \ v] | |
\S 任何非空白符,等价于[^\ t \ n \ r \ f \ v] | |
\d 任何数字,等价于[0-9] | |
\D 除了数字之外的任何字符,等价于[^0-9] | |
[\b] 一个退格直接量(特例) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment