Revision 7.10
2/28/2012
^
The beginning of a line
$
The end of a line
\b
A word boundary
\B
A nonword boundary
\A
The beginning of the input
\G
The end of the previous match
\Z
The end of the input but for the final
, if any
\z
The end of the input
Greedy quantifiers
X
?
X
, once or not at all
X
*
X
, zero or more times
X
+
X
, one or more times
X
{
n
}
X
, exactly
n
times
X
{
n
,}
X
, at least
n
times
X
{
n
,
m
}
X
, at least
n
but not more than
m
times
Reluctant quantifiers
X
??
X
, once or not at all
X
*?
X
, zero or more times
X
+?
X
, one or more times
X
{
n
}?
X
, exactly
n
times
X
{
n
,}?
X
, at least
n
times
X
{
n
,
m
}?
X
, at least
n
but not more than
m
times
Possessive quantifiers
X
?+
X
, once or not at all
X
*+
X
, zero or more times
X
++
X
, one or more times
X
{
n
}+
X
, exactly
n
times
X
{
n
,}+
X
, at least
n
times
X
{
n
,
m
}+
X
, at least
n
but not more than
m
times
Logical operators
Page 213 of 228