Consider a phrase: The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog.
I want to write a regex of the form:
if phrase doesn't contain `cat` then
does phrase contain dog?
else
no match
end
I think it should be
(?(cat)|dog)
But this doesn't work.
What am I doing wrong?