Regular expressions (regex) are used to perform advanced searches against the text.
For the uninitiated, anything but a trivial regular expression can be a confusing mess. To make the topic more involved, regular expressions are slightly different across different programming languages, platforms, and tools.
Given that PowerShell is built on .NET, PowerShell uses .NET style regular expressions. There are often several different ways to achieve a goal when using regular expressions.
In this chapter, we will cover the following topics:
- Regex basics
- Anchors
- Repetition
- Character classes
- Alternation
- Grouping
- Examples