This table summarizes character matching syntax.
Character class |
Meaning |
. |
Matches any character except \n. If modified by the Singleline option ( see Regular Expression Options ), a dot matches any character. |
[ aeiou ] |
Matches a single character included in the specified set of characters. |
[ ^aeiou ] |
Matches a single character not in the specified set of characters. |
[ 0-9a-fA-F ] |
Matches any character in the named character class specified by [ :name: ] . |
\w |
Matches any word character. Same as
[ a-zA-Z_0-9 ] . |
\W |
Matches any nonword character. Same as [ ^a-zA-Z_0-9 ] . |
\s |
Matches any white-space character. Same as [ \f\n\r\t\v ] . |
\S |
Matches any non-white-space character. Same as [ ^ \f\n\r\t\v ] . |
\d |
Decimal digit. Same as [ 0-9 ] . |
\D |
Nondigit. Same as [ ^0-9 ] . |