I have the following regular expression:
first.*(?<!.*([;,\.]|and).*)second
I would like it to match the following:
first some word second
But not match the following:
first . some word second
first ; some word second
It is working but it is also excluding the following:
blah ; first some word second
I only want it to exclude matches if the negative look ahead falls in between the two words. It should not look behind the first word.