- 论坛徽章:
- 0
|
I just copied it from the "man grep".
regular expressions:
single character
\meta-character
bracket expression:[set of char],is for a single char in the set.
range expression:seems a kind of bracket expression,is for any char betweet the two char besides the hyphen.
predefined:[:alnum:],[:alpha:],[:cntrl:],[:digit:],[:graph:],[:lower:],[:print:],[:punct:],[:space:],[:upper:],[:xdigit:] for example(i dont kown what's this),[[:alnum:]] for [0-9A-Za-z]
. :any single char
\w :[[:alnum:]]
\W :[^[:alnum:]]
^,$ :match at the beginning and the end of a line
\ :.................................of a word
\b :at the edge of a word
\B :not at the edge of a word
repetition char:
? :at most once
* :zero or more
+ :one or more
{n} :exactly n times
{n,} :n to infinite
{m,n} :m to n
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/22769/showart_197064.html |
|