Press "Enter" to skip to content

RegEx Capture Names in Powershell

Jeffery Hicks shows how you can use regular expressions to create capture names in Powershell:

Once you have matching patterns, you can define them with a name. The general layout looks like this:


The parentheses are key. My datetime pattern can be defined as a named capture:


Click through to see how you can combine these and turn them into Powershell objects.