The following special characters are interpreted in regular expressions
|
Character |
Matches |
|
^ (at the beginning only) |
beginning of line |
|
. |
any single character. In multi-line mode, this also matches the end-of-line character. |
|
[abc] |
any single character that belongs to the set abc |
|
[^abc] |
any single character that does not belong to the set abc |
|
* |
zero or more occurrences of the preceding character |
|
+ |
one or more occurrences of the preceding character |
|
\t |
a tab character |
|
\s |
a space character |
|
\w |
white space (a tab or a space character) |
|
\n |
new-line, or the end-of-line character. Use this if you want to match a line break in the middle of a pattern. |
|
$ |
the end of the line |
Sets, such as [abc] may be in the following formats.
|
Set type |
Meaning |
|
[<character list>] |
Matches any character within the set. The set can be any number of characters long. |
|
[x-y] |
Matches on any character within the range of x through y, inclusively. The ASCII value of x must be less than that of y. |
|
combination; |
Character lists and ranges may be combined. |