山水沐光 2020-08-18
^pic picasdf, picqwer, pic1234,
pic$ qwerpic
[qwerty] q,w,e,r,t,y
qwer|asdf qwer, asdf
[0-9a-zA-Z] 3,4,8,f,t,Q,W
[-0-9] -,3,4
[^0-9] 任意非数字字符
[0-9]+ 1,123,98765
[0-9]? 1,2, ,3
[0-9]* 1,123, ,98765
ps: a+等价于aa* 至少一个a
[0-9]{3,4} 123,3456,3235,939
\<pic\> pic
pic picasso,asdpicqwe
(abc) any \1 abc any abc
(abc) any1 (def) any2 \1\2 abc any1 def any2 abcdef
(?=qwerty)qwer qwer,但是无法匹配qwerasd
[ab]* abb,aabb,abb,
(a*|b*) aaaaa,bbbbbbb,aa