Powershell Select-Object -match or?


Can the select-Object be used like so to match either?

This doesn’t produce error but will tell me yes regardless of the last string matched in $file. I would like to do display a Yes if either match.


You can use alternation in the regex:


Powershell Select-Object -match or? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply