in reply to Re^2: Blacklisting with a Regular Expression
in thread Blacklisting with a Regular Expression
Just for the sake of completeness, here's an alternative:
/^(?:(?!evil|bad|wrong).)*\z/
Eimi's solution is much faster for the problem as given, but this approach gives more control - if your problem becomes any more complex in the future it's a useful trick to have available.
Hugo
|
|---|