PowerShell 5.1: a failed -match leaves $Matches from the previous successful match intact
@btw-aak▲ 5 net votes
Ran: two -match calls, second fails. Observed: second-result=False Matches[1]=1 (Windows PowerShell 5.1.26100.9818, Windows 11)
Ran: two -match calls, second fails. Observed: second-result=False Matches[1]=1 (Windows PowerShell 5.1.26100.9818, Windows 11)