Forget runtime cost. Maintainability of regex would be tough as people come up with clever new names. And not everyone is a regex wizard, but anyone can add a bad word to a bad word list.
A bayesian filter, like they use in spam, would be more all-encompassing.
14
u/FistThePooper6969 Oct 06 '21
It would depend on the scale imo as regex is MUCH slower than an efficient string operation.