Hi,
I have some strings to check against a Regex pattern. Here is the regex:
apple(?!( ?not)).*?inc(\.|luded)?
string 1: "banana, rotten apple not included" - does not give me a match which is what I want.
string 2: "banana, rotten apple included" - produces a match which is what I want
But if I have a string like...
"banana, rotten apple, ripe avocado not included" or "banana, rotten apple and apricot not included" both produces a match which I don't want.
So basically, I want to see if both "apple" and "included" (or "inc" or "inc.") are in the string and NO "not" before "included" and ignore everything else in between.
Thanks!