Ever since I've learned about regex, I've come to a conclusion that it is not a best tool for a bad work kicker. Let's you have lots of bad words to add. Your regex string will get very, very long over time. (unless, of course, you use the line break identifier) but that will still look very untidy and you can get your remote file increased in size. The best method I have found is using hash tables with > if ($hfind(badword,$1-,w,1)) {to look for matches.
However, you can still use regex to match bad words stored in a text file. Something like this:
if ($regex($1-,/(?:^| )(\Q $+ $replacecs($read(swear.txt,n,1),\E,\E\\E\Q,$chr(32),\E|\Q) $+ \E)(?= |$)/iS)) {