Windows PowerShell and Regular Expressions
If you are a PowerShell Pro who needs to know what regular expressions are and how to take advantage of them in PowerShell, then this course is for you. Learn the regex fundamentals, from matching, splitting, replacing, to turning text into objects.
What you'll learn
Many IT Pros, at least those from the Windows world, think regular expressions are hard, or don't know why they might want to use them. Why bother learning and using them in your PowerShell scripting or even at a console prompt? In this course, Windows PowerShell and Regular Expressions, you will learn the key regular expression concepts and techniques that you can immediately put to use in PowerShell. You don't need to know and learn everything about regular expressions, just enough to get started. First, you will discover the basic syntax to create a regular expression pattern. Next, you will learn how to use these patterns in PowerShell. Finally, you will explore how to incorporate regular expressions into your PowerShell scripting. When you are finished with this course, you should have a better understanding of how regular expressions work, how to build them, and how to use them in PowerShell to make you not only a better scripter, but also a better IT professional.
Table of contents
- Meet [Regex] 2m
- Demonstration: Matching with [Regex] 4m
- Demonstration: Splitting with [Regex] 5m
- Demonstration: Splitting String Choices 3m
- Demonstration: A Practical Splitting 5m
- Demonstration: Replacing with [Regex] 3m
- Demonstration: A Practical Replacement Proof of Concept 4m
- Demonstration: A Practical Replacement 5m
- Demonstration: Options with [Regex] 3m
- Summary 1m
Course FAQ
PowerShell Regular Expression (regex) is a sequence of characters, or a pattern, to help you match or find text using a special syntax. It can be made up of characters, operators, and other constructs to help you search, edit, or manipulate text and data.
Below are a few examples of regex and the types of results it should return:
- colou?r text that contains {color, colour}
- go*gle text that contains {ggle, gogle, google, gooogle, goooogle,...}
- z{3,6} text that contains {zzz, zzzz, zzzzz, zzzzzz}
- gr[ae]y text that contains {gray, grey}
- rege(x(es)?|xps?) text that contains {regex, regexes, regexp, regexps}
- ^dog text that begins with "dog"
- dog$ text that ends with "dog"
In this PowerShell Regular Expression course you will learn the key regular expression concepts and techniques that you can immediately put to use in PowerShell, including:
- What regex is and why you should care
- How to build regular expression commands
- Regex objects
- Parsing with PowerShell and regular expressions
- Much more!
If you are a PowerShell Pro who needs to know what regular expressions are and how to take advantage of them in PowerShell, then this course is for you! Anyone interested in learning PowerShell regular expressions will benefit from this course.
Before taking this PowerShell regex course you should already be familiar with PowerShell fundamentals.