Windows PowerShell and Regular Expressions
By Jeff Hicks
Course info



Course info



Description
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.
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.
Section Introduction Transcripts
Course Overview
[Autogenerated] Hi, everyone. My name is Jeff Fix and welcome to my course PowerShell and regular expressions. I'm a veteran IDE pro and longtime PowerShell author, teacher and mentor. I know a lot of people who are afraid of regular expressions or at least feel it is a topic they don't need or can't learn on. That's simply not true. While regular expressions is a big topic, you don't need to learn everything before you can use it. This course is designed to give you an introduction into the regular expression, language and features that you will most likely use in PowerShell. Some of the major topics that we will cover include learning how to build a regular expression pattern, learning how to match text with it, learning how to use regular expressions with the select string. Cmdlet learning how to use the rejects .NET object in PowerShell as well as advanced regular expression techniques such as name captures, optional captures and look around. By the end of this course, you will know how to use regular expressions to match, split and replace. You'll see how you can incorporate regular expressions into your PowerShell scripting before beginning the course. You should be familiar with PowerShell fundamentals. The examples in this course don't need anything beyond a PowerShell console. Once you see what you could do with all of this, you will wonder why you waited so long to dive in. So don't put it off any longer. I hope you'll join me on this journey to learn more about PowerShell and regular expressions at Pluralsight and