|Perl Language Reference Manual|
by Larry Wall and others
Paperback (6"x9"), 724 pages
RRP £29.95 ($39.95)
Sales of this book support The Perl Foundation! Get a printed copy>>>
12.5 Character classes
Perl regular expressions have a large range of character classes. Some of the character classes are written as a backslash sequence. We will briefly discuss those here; full details of character classes can be found in 13.
\w is a character class that matches any single word character (letters,
\d is a character class that matches any decimal digit,
while the character class
\s matches any whitespace character.
New in perl 5.10.0 are the classes
\v which match horizontal
and vertical whitespace characters.
The uppercase variants (
character classes that match any character that isn't a word character,
digit, whitespace, horizontal whitespace nor vertical whitespace.
Mnemonics: word, digit, space, horizontal, vertical.
|ISBN 9781906966027||Perl Language Reference Manual||See the print edition|