does not match
The PowerShell Match operator will return a True or False value depending on if the source matches the provided pattern. Great for use with Where or If statements.
"The number 7 is great!"
There is an automatic variable created upon a match called $Matches
"Hello Justin, Welcome"
"My name is $($matches)"
The $Matches variable is a collection of match results from the pattern. Index 0 is the string that was matched and after that its the match group which is anything with in ( )
"today is 04/13/1999"
Regex Replace Using Found matches
Regex replace using found matches next to numbers
Depending on what sort of matching you need to do, there can be a very significant difference in the performance of regex. Patterns themselves can have an impact on the speed as well.
Nice set of resources learning regular expression for powershell.
Thanks for sharing :)
I was looking for something like this, thanks for making this wiki Rich
jrich edited Revision 8. Comment: created basic structure, will populate data
jrich edited Revision 10. Comment: updated Match (saving work)
Very useful resources, thanks a lot
joakimbs edited Revision 13. Comment: Promoting my article, since I frankly think it deserves mention here.
Ed Price - MSFT edited Revision 15. Comment: White space tweaks