I want to test for strings that do not contain a particular sub string
Examples strings are:
event2
event23,event1,event67=12
event1,event30
event23
event2
event2,event23
I want to match strings that do not contain event2
.
Therefore the following strings should match:
event23,event1,event67=12
event1,event30
event23
So far I can match strings the do contain event2
with the following expression:
/^.*(\bevent2\b)/gm
But I don't know how to combine this with a negative lookahead.
This doesn't seem to work:
/^.*(?!.*(\bevent2\b))/gm