The regex match range can get real long if there's a lot of bad words to add. It may also get cut off. Using $count() for bad word matching is pretty much the same as the regex you use in your script. You can use the line break $& identifier to break up a single line to multiple ones. But you can't use the $& for regex...because it won't work.