Summary of RegExp Pattern Syntax

Character Description
\ escape "special characters"
^ start of the line
$ end of the line
* zero or more
+ one or more
? zero or one
. matches one character
(pattern) limits scope, and provides grouping
x|y either x or y
{n} exactly n times
{n,} at least n times
{n, m} at least n times but no more than m times
[xyz] any character listed
[^xyz] any character not listed
\b word boundary
\B non-word boundary
\d digit
\D non-digit
\f form-feed character
\r carriage return
\n new-line character
\s whitespace character
\S non-whitespace character
\t tab
\v vertical tab
\w any word character including underscore
\W any non-word character