Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

PowerShell Regex help needed

$
0
0

Hello,

I want to match a string if it contains the word 'Error' but don't match if the string contained 'Minor Error' or 'Small Error'

I have tried the following but its not working

"Minor Error" | select-string -pattern "(?!Minor\sError|Small\sError)Error"

Any ideas?


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>