79145056

Date: 2024-10-31 14:09:34
Score: 1
Natty:
Report link

I have no doubt there is a better way but this seems to match your example:

Where-Object { $_ -match '^(?!.*user).*error.*' }

it will pass only the lines which do not match the word user anywhere but match the word error

https://regex101.com/r/9kFxBt/1

Reasons:
  • RegEx Blacklisted phrase (2): I have no doubt
  • Low length (0.5):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: sirtao