Unleashing the Power of Regular Expressions
One of the interesting features of Windows PowerShell is the ability to work with regular expressions. Regular expressions are optimized to manipulate text. You've learned about using regular expressions with the switch statement to match a particular word, however, you can do as much with the -wildcard switch. Now you'll learn some of the more advanced tasks you can complete with regular expressions. Table 2-4 lists the escape sequences you can use with regular expressions.
Table 2-4. Escape Sequences
Character | Description |
---|---|
ordinary characters | Characters other than . $ ^ { [ ( | ) * + ? \ match themselves. |
\a | Matches a bell (alarm) \u0007. |
\b | Matches a backspace \u0008 if in a [] character class; in a regular ... |
Get Windows PowerShell™ Scripting Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.