in reply to excluding strings in regex

The original post doesn't really say why "cat" is OK and "housecat" isn't (could be word boundary issues, length issues, hair on the sofa issues, whatever). So it is hard to give a precise answer. That said, just wanted to point out if your situation allows multiple regexps, sometimes things get simpler:
if (/cat/ and ! /housecat/) {... # or if (/cat\b/ and ! /housecat\b/) {... # etc etc
Just stating the obvious: often times no need to cram everything into one regexp, when using two can make things simpler.

water