Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

select-string searching for "[]"

$
0
0

Hello,

I want to use select-string to look for "![]" in a set of text files, but the error returned is: The string "[]" is not a valid regular expression: parsing "[]" - Unterminated [] set.

Get-ChildItem "somepath" -recurse | select-string -pattern "![]"

I believe it's interpreting [] in a different way.  I've tried placing the ` character in many different places in the command but it's not working.

Thanks for any help you can provide


Viewing all articles
Browse latest Browse all 6937

Latest Images

Trending Articles



Latest Images