in reply to excluding strings in regex

In general, if you want to match a word, use the word boundary assertions: /\bcat\b/.

If you specifically want to exclude "housecat" and "polecat" but match "Yucatan" or anything else that has "cat", use a negative lookbehind assertion: /(?<!pole)(?<!house)cat/. (The regex that goes in (?<! ) or (?<= ) must be a fixed width, so "pole" and "house" need separate assertions; however "wild" could be combined with "pole" as /(?<!wild|pole)cat/.