A few basic characters can go a long way. A number of the most widely used characters and operators are introduced in this section and summarized in the following table:
Description | Character | Example |
Literal character | Any except: |
|
Any single character (except carriage return, line feed, |
|
|
The preceding character repeated zero or more times |
|
|
The preceding character repeated one or more times |
|
|
Escape a character's special meaning |
|
|
Optional character |
|
|
Regular expressions can quickly become complicated and difficult to understand. Modifying a complex regular expression is not a particularly simple undertaking.
While PowerShell indicates if there is a syntax error in a regular expression, it cannot do more than that; for example, PowerShell announces that there is a syntax error in...