A fairly simple regex rule I'm trying to create. However, I'm only finding tips for captures of the word and not whole phrases.
I want to capture all lines that contains red
unless it also contains ball
. It doesn't matter in what order. I just only need to capture red
only without ball
.
I have a red ball
I have a red cup
I have a green ball
This cup that I have is red
The bonus would be a regex rule for the inverse of this. Capture red
and ball
not not ball
only.
Any help on this would be much appreciated.
Edit:
Unfortunately it's being downvoted with a link to another post that isn't quite the same question. I apologize for the confusion.