I need a pattern to match for a word and not match for another
input
black dog
black dog and gray cat
I need a pattern that match all strings that contain dog
or house
but it must not contain cat
or girl
The first input is a match but the second is not a match
pattern
/dog|house|(?!cat|girl)/