Regex basics
A regular expression is a pattern consisting of literal characters, an exact match, and special characters that have a variety of different behaviors. For example, the dot character, .
, matches any single character and not a literal dot.
A few basic characters can go a long way. Several of the most widely used characters and operators introduced in this section are summarized in Table 9.1:
Character |
Description |
Example |
Any, except: |
Literal character |
|
|
Any single character (except carriage return, line feed, |
|