I am trying to exclude records which have the word "owner" somewhere preceding the word "dog"
- the owner has a dog (exclude)
- the owner has a black and brown dog (exclude)
- John has a dog (include)
- John has a black and brown dog (include)
Here is current regex:
\b(?<!owner\s)\w+\sdog\b
This works for a single unknown word ('owner has dog' is excluded but 'owner has a dog' is included)), however, I am unable to capture multiple words which retain its negative look behind across all words between "owner" and "dog".
Many Thanks