Logical And for regex in Powershell?

Trying to display strings that contain a pattern at the start and at the end of the string, I got

$TempArray -match “^w” -and “w$”

to work but that will only display “True” and the not the strings it matches. I can’t use select-string also because my assignment wants me to use -match for this.

submitted by /u/justinsst
[link] [comments]

Leave a Reply