Detecting Text Patterns with PowerShell Regular Expressions

Published: 04 September 2019
on channel: Trevor Sullivan
7,040
155

When you want to extract some text from a string, regular expressions come to the rescue. There are a few different ways of using regular expressions in PowerShell, but the -match operator is arguably the easiest. We'll take a look at how to use the -match operator to evaluate regular expressions against singleton and array string values. We'll also explore the built-in $matches variable, which gets populated when you have a positive match against a singleton string value, using the -match operator.

In PowerShell, you can read the manual page for regular expressions, using this command: Get-Help -Name about_Regular_Expressions
Here's the web-based version of the documentation: https://docs.microsoft.com/en-us/powe...

Apologies for cropping off my head. I will fix this for future videos!

Producer: Trevor Sullivan
Website: https://trevorsullivan.net
Patreon:   / trevorsullivan  
Twitter:   / pcgeek86  
Gab: https://gab.ai/trevors

Intro music "Amen Tune" used, with permission, from Aaron Static. Check out his music here:   / aaronstatic  

#Microsoft #PowerShell #automation


On this page of the site you can watch the video online Detecting Text Patterns with PowerShell Regular Expressions with a duration of hours minute second in good quality, which was uploaded by the user Trevor Sullivan 04 September 2019, share the link with friends and acquaintances, this video has already been watched 7,040 times on youtube and it was liked by 155 viewers. Enjoy your viewing!