Java Reference
In-Depth Information
C
HARACTER CLASSES
a through d or m through p;
[a-dm-p]
(union)
[a-d[m-p]]
d, e, or f;
[def]
(intersection)
[a-z&[def]]
a through z, except b or c;
[ad-z]
(sub-
traction)
[a-z&[^bc]]
a through z, except m through p;
[a-lq-
z]
[a-z&[^m-p]]
P
REDEFINED CHARACTER CLASSES
any character (might match line termin-
ators)
.
digit;
[0-9]
\d
non-digit;
[^0-9]
\D
whitespace character;
[\t\n\x0B\f\r]
\s