Use a single regular expression instead of a for loop.

I think using a single regular expression test instead of checking each word individually makes sense.. The regular expression only compiled once and for each change of the word list (which should be only once).