PowerShell: Automating Administrative Tasks
by Michael Shepard, Chendrayan Venkatesan, Sherif Talaat, Brenton J.W. Blawat
Summary
This chapter explained the basics of regular expressions and showed how to integrate them with PowerShell. It explained that if you are using regular expressions, you should fully comment on the code to allow other developers to read your expressions easily. This chapter further explained that PowerShell uses the –match, -cmatch, and –replace operators with regular expressions to evaluate criteria for strings. You also saw the most common metacharacters and how to use them in expressions. You also learned how to use grouping constructs, ranges, and qualifiers. This chapter discussed the most common anchors and concluded by providing examples of regular expressions that you may use in your scripts. These examples included a regular expression ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access