.
Any character except newline
a
The character a
ab
The string ab
a|b
a or b
a*
0 or more a's
\
Escapes a special character
*
0 or more
+
1 or more
?
0 or 1
{2}
Exactly 2
{2,5}
Between 2 and 5
{2,}
2 or more
(,5)
Up to 5
[ab-d]
One character of: a, b, c, d
[^ab-d]
One character except: a, b, c, d
[\b]
Backspace character
\d
One digit
\D
One non-digit
\s
One whitespace
\S
One non-whitespace
\w
One word character
\W
One non-word character
.
Any character except newline
a
The character a
ab
The string ab
a|b
a or b
a*
0 or more a's
\
Escapes a special character
*
0 or more
+
1 or more
?
0 or 1
{2}
Exactly 2
{2,5}
Between 2 and 5
{2,}
2 or more
(,5)
Up to 5
[ab-d]
One character of: a, b, c, d
[^ab-d]
One character except: a, b, c, d
[\b]
Backspace character
\d
One digit
\D
One non-digit
\s
One whitespace
\S
One non-whitespace
\w
One word character
\W
One non-word character