Topic on Project:Support desk

188.24.79.140 (talkcontribs)

Hey! I have added a bad word filter for the abuse filter extensions, but it does not seem to work. Even though I have written regex for words such as the f and s words, they were still added into some articles by vandals. Here it is: http://pastebin.com/3YMMVC81

The only thing under 'actions taken when matched' that's checked is: Prevent the user from performing the action in question

Would someone please tell mere where I have went wrong?

Ciencia Al Poder (talkcontribs)

There are multiple things wrong

First of all, article_namespace == 0 & article_namespace == 1 won't match anything because a single edit can't be done at 2 or more namespaces at the same time.

Also, [\*u][\*] means letter * or letter u followed by letter *, but that doesn't seem to be what do you want to block...

There's a section for examining past edits in the abuse filter, you can use it to test your regular expressions and see if they match or not

188.24.79.140 (talkcontribs)

Thank you. And what should I replace those with?

87.123.57.58 (talkcontribs)

For example the AND operator & should be replaced by the OR operator |. Then I would put brackets around those expressions, which are connected by OR so that the evaluation order is: First the ones with OR and after that the conditions with AND.

See Extension:AbuseFilter and especially Extension:AbuseFilter/Rules_format for more information!

188.24.79.140 (talkcontribs)

How about now: http://pastebin.com/McXU12FW? I didn't quite catch your second part. I did read those articles, but I am very bad at regex. As a matter of fact, I wasn't the one who wrote that filter.

Ciencia Al Poder (talkcontribs)
188.24.79.140 (talkcontribs)

Great, thank you!