Yes, the -match operator results in True or False ; assigning $null suppresses the output.
The regex (?<>) Syntax creates a capture group. In this case, it creates a capture group called x for any characters between <FancyPants> and <.FancyPants> . $matches contains match information for the last match. Capture groups can be referenced in $matches.CaptureGroupName .
Here is an example that you can use to see what is in the $matches variable.
'123 Main','456 Broadway'| foreach{$_; $null = $_ -match '(?<MyMatch>\d+)'; ($Matches| ft *)}
In this example, you should use $Matches.MyMatch to refer to a match.
source share