Regular expression for word filter

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Lsha
Registered User
Posts: 111
Joined: Mon Feb 25, 2019 10:38 am

Regular expression for word filter

Post by Lsha »

is there anyway we can use regular expression for word filter
User avatar
Exclusive
Registered User
Posts: 676
Joined: Mon Jun 25, 2018 1:33 pm

Re: Regular expression for word filter

Post by Exclusive »

Do you mean word censoring?
Use Search Button to get Instant Results | Follow Forum Rules
Avoid Spams in the forum to prevent banning the offending account. | ⟿ Visit My Awesome phpBB Forum! ⬳

Best Web Hosting with 99.9% Uptime! | ✔ Buy Cheap Domain Names
Lsha
Registered User
Posts: 111
Joined: Mon Feb 25, 2019 10:38 am

Re: Regular expression for word filter

Post by Lsha »

yes, word censoring
i6eal
Registered User
Posts: 4
Joined: Fri Oct 04, 2019 11:44 am

Re: Regular expression for word filter

Post by i6eal »

I would do it like so:

create an array with all the bad words ["fuck","shit", ...], create a funktion to run after the post/comment is created and iterate through the bad words array and censor all the bad words with i.E. ******.
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Regular expression for word filter

Post by canonknipser »

That function is builtin with phpBB and is called "word censoring", working when any part of a word contains a censored word.

I guess the OP wants something working with regular expressions, which will be beyond the scope of a regular phpBB admin :oops:
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
Lsha
Registered User
Posts: 111
Joined: Mon Feb 25, 2019 10:38 am

Re: Regular expression for word filter

Post by Lsha »

@canonknipser

thanks for the confirmation
Post Reply

Return to “[3.2.x] Support Forum”