See also a lot of general hints and useful links at the regex tag details page.
Online tutorials
Quantifiers
*
*?
*+
+
+?
++
?
{n,m}
{n,}
{n}
{n}?
Character Classes
[...]
[^...]
[^]
[w-[d]]
[a-z-[qz]]
[w&&[^d]]
[[:alpha:]]
[^\D2]
[^[^0-9]2]
[^2[^0-9]]
d
D
w
W
s
S
p{L}, P{L}
Escape Sequences
h
R
H
V
N
v
e
Anchors
^
B
$
A
z
G
(Also see "Flavor-Specific Information → Java → The functions in Matcher")
Matcher
Groups
(...)
(?:)
1
$1
g<1>123
(?i:regex)
(?P<group_name>regexp)
(?>)
(?|)
regular-expressions.info
(?<groupname>regex)
2.1m questions
2.1m answers
60 comments
57.0k users