| |||
| Home > Searching and Replacing Text > Using regular expressions > About special operators | |||
Table 12.3 shows the characters that have special meanings in a regular expression. In some cases, their meaning depends on where they occur in the regular expression.
Table 12.3. Regular expression metacharacters
Metacharacter | Description |
|---|---|
| The match-any-character operator matches any single character. |
| The match-zero-or-more operator repeats the smallest preceding regular expression as many times as necessary (including zero) to match the pattern. |
| The match-one-or-more operator repeats the preceding regular expression at least once, and then as many times as necessary to match the pattern. |
| The match-zero-or-one operator repeats the preceding regular expression once or not at all. |
| The back-reference operator refers to a literal character within the regular expression. |
| The alternation operator
matches one of a choice of regular expressions, for example |
| The match-beginning-of-line operator
matches the string from the beginning of the string or after a new-line
character, for example |
| The not operator
is used inside square brackets, or [], to represent a NOT action,
for example |
| The match-end-of-line operator
matches the string either at the end of the string or before a new-line
character in the string, for example |
| List operators enable
you to define a set of items to use as a match. The list items must
be enclosed within square brackets. You cannot define an empty list,
for example |