KW.pm
Regular Expressions
#6
Character Classes
There are a bunch metasymbols that represent character classes:
Symbol
Definition
\d
[0-9]
\s
[ \t\n\r\f]
\w
[a-zA-Z0-9_]
The complements of these classes can be accessed by using upper-case versions of the metasymbols. e.g.
\D
matches any non-digit character,
[^0-9]
There are also unicode and POSIX character classes
<< Previous
|
Index
|
Next >>
Copyright © 2002
Christopher Calzonetti