Glossary: Command Line for IT: Bash and PowerShell
$Matches
Also written: $Matches[1], $Matches.user
After a successful -match, PowerShell puts the captured groups in $Matches. $Matches[1] is group 1, and a named group can be read by name, such as $Matches.ip.