- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
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, digits, underscore). \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 \h and \v which match horizontal and vertical whitespace characters.

The uppercase variants (\W, \D, \S, \H, and \V) are 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 9781906966027Perl Language Reference ManualSee the print edition