If I have a pattern such as (word1|word2|word3) how do I specify in a regex anything not matching these subexpression? I.e. how do I negate this?
(word1|word2|word3)
Try adding (?!pattern). This should negate the whole pattern.