In this chapter, we took a look at regular expressions and their use in PowerShell.
The Regex basics section introduced a number of heavily used characters. Anchors showing how the start and end of a string or word boundary may be used to restrict the scope of an expression.
Character classes were introduced as a powerful form of alternation, providing a range of options for matching a single character. Alternation was demonstrated using different sets of expressions to be evaluated.
We looked at repetition using "*", +, ?, and curly braces, and discussed the notion of greedy and lazy expressions.
Grouping was introduced as a means of limiting the scope of alternation in order to repeat larger expressions or to capture strings.
Finally, a number of examples were included, bringing together the areas covered in this chapter to solve specific problems.
In Chapter...