I’m trying to create a regex pattern in Xbench that checks whether certain words are not used interchangeably in a sentence. For example, if the sentence contains instances of the word “cat” then there has to be the word “dog” somewhere between them.
Please see a working example of what I mean:
The problem is that the pattern uses lookahead function that the Xbench flavor of regex does not support. How to modify that pattern so it works in Xbench? Is there a way to check for missing words between other words?
I have tried different combinations of regex and PowerSearch, but haven’t had any success so far.
The reason why I want to create this pattern is because there are two different words for “and” in my language and they should be used in turns in a sentence.