The way you have it, for instance:> blah blah blah word1 blah <- This won't trigger.
word1 <- this will trigger, but on a one-word basis. In other words, it'll trigger when nothing attaches to or follows it.
Take out the ^ and $ so the bad words will be matched in a sentence.
It's ok if you need to watch out for a few bad words using the on text regex approach. It's not recommendable if you want to look out for more bad words or add or delete more of them.
The best method I've known is using a hash table and
$hfind(badwords,$strip($1-),1,w).data
to match against words added in it. You can also use the -r switch for regex. word1|word2|word3|etc.. to be stored in hash table's data.
I won't go into detail of the hash table if you don't know about it. Read up on it at your leisure.