Abbreviations such as \d instead of [0-9] are allowed. The following abbreviations are recognized:
Abbreviation | Expansion | Matches |
---|---|---|
\a | ([a-zA-Z0-9]) | Any alphanumeric character |
\b | ([ \t]) | White space (blank) |
\c | ([a-zA-Z]) | Any alphabetic character |
\d | ([0-9]) | Any decimal digit |
\h | ([0-9a-fA-F]) | Any hexadecimal digit |
\n | (\r|(\r?\n)) | Newline (both Windows and UNIX) |
\q | (\"[^\"]*\")|(\'[^\']*\') | A quoted string (either single or double quotes) |
\w | ([a-zA-Z]+) | A simple word |
\z | ([0-9]+) | An integer |