Summary

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 10, Files, Folders, and the Registry, we will discuss working with files, folders, and the registry.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.49.190