Tetra-WebBBS Support Forum

Re: Any way to block particular sentences

: ^badword
: word beginning badword

Beginning of LINE, not word :)

: badword$
: word ending badword

Ending of LINE, not word.

: did not work

Probably did work, only you expected something different ;)

Details:
http://perldoc.perl.org/perlre.html

NOTE:
each line of unwanted word list is treated as a regex. So you should put in the list only what you want to sit between the regex delimiters.
E.g.:
/\bbadword\b/
!\bbadword\b!

The / or ! are handled by the scripts themselves, so pay attention to what your item in the filter list is ... and test it to ensure the item doesn't cause an error 500.

All matching is caseINsensitive anyway, thus no need to take care of it.

.... and .... don't forget to excape meta characters. But don't escape what you want to be recognised as a meta character. Thus:

correct: \b for a word boundary
wrong: \\b - which would escape the "\"
totally wrong: /\b - which would throw an error 500

Enjoy!
Rainer