^
, .
, [
, ]
, $
, (
, )
, *
, +
, ?
, |
, {
, }
, \
, !
, <
, >
, =
, :
^
: start of a string
$
: end of a string
.
: any char
*
: 0, 1 or more occurences
+
: 1 or more occurences
?
: 0 or 1 occurences
|
: alternative "or"
a{3}
: match exactly "aaa"
a{2,}
: match at least 2 consecutive "a"
a{2,4}
: match 2, 3, or 4 consecutive "a"
[...]
: define a char class
[^...]
: define a complemented class
[...-...]
: define an interval
(...)
: used to limit the scope ( with assertions captures the result )
(?:...)
: without capture
(?=...)
: positive lookahead
(?!...)
: negative lookahead
(?<=...)
: positive lookbehind
(?<!...)
: negative lookbehind
\n
: new line
\r
: carriage return
\t
: tab
\b
: word limit
\B
: not a word limit
\d
: figure
\D
: not a figure
\s
: white space ( \t \r \n \f )
\S
: not a white space
\w
: word
\W
: not a word