regex

Character Class Abbreviations
\dMatch any character in the range 0 - 9 (equivalent of POSIX [:digit:])
\DMatch any character NOT in the range 0 - 9 (equivalent of POSIX [^[:digit:]])
\sMatch any whitespace characters (space, tab etc.). (equivalent of POSIX [:space:] EXCEPT VT is not recognized)
\SMatch any character NOT whitespace (space, tab). (equivalent of POSIX [^[:space:]])
\wMatch any character in the range 0 - 9, A - Z and a - z (equivalent of POSIX [:alnum:])
\WMatch any character NOT the range 0 - 9, A - Z and a - z (equivalent of POSIX [^[:alnum:]])
Positional Abbreviations
\bWord boundary. Match any character(s) at the beginning (\bxx) and/or end (xx\b) of a word, thus \bton\b will find ton but not tons, but \bton will find tons.
\BNot word boundary. Match any character(s) NOT at the beginning(\Bxx) and/or end (xx\B) of a word, thus \Bton\B will find wantons but not tons, but ton\B will find both wantons and tons.
Comments