Constructing Regular Expressions

from p.25 of Programming Perl

.Matches any character except newline
[a-z0-9]Matches any single character of set
[^a-z0-9]Matches any single character not in set
\dMatches a digit, same as [0-9]
\DMatches a non-digit, same as [^0-9]
\wMatches an alphanumeric (word) character [a-zA-Z0-9_]
\WMatches a non-word character [^a-zA-Z0-9_]
\sMatches a whitespace char (space, tab, newline...)
\SMatches a non-whitespace character
\nMatches a newline
\rMatches a return
\tMatches a tab
\fMatches a formfeed
\bMatches a backspace (inside [] only)
\0Matches a null character
\000Also matches a null character because...
\nnnMatches an ASCII character of that octal value
\xnnMatches an ASCII character of that hexadecimal value
\cXMatches an ASCII control character
\metacharMatches the character itself (\|,\.,\*...)
(abc)Remembers the match for later backreferences
\1Matches whatever first of parens matched
\2Matches whatever second set of parens matched
\3 and so on...
x?Matches 0 or 1 x's, where x is any of above
x*Matches 0 or more x's
x+Matches 1 or more x's
x{m,n}Matches at least m x's but no more than n
abcMatches all of a, b, and c in order
fee|fie|foeMatches one of fee, fie, or foe
\bMatches a word boundary (outside [] only)
\BMatches a non-word boundary
^Anchors match to the beginning of a line or string
$Anchors match to the end of a line or string