This regex (?<!not)s(helloW*world)
will not match when hello world
is preceded by not
word.
How do I make it not match too when there’s a word in between: not a hello world
?
I’m trying this regex (?<!not)(?:s+.*)?s(helloW*world)
with the (?:s+.*)?
to make the in-between word optional but doesn’t seem to work.
https://regex101.com/r/HPcJ9F/1