How do I return only the matching regular expression when I select-string(grep) in PowerShell? July 10, 2023 by Tarik Or just: Select-String .-.-. .\test.txt -All | Select Matches