Ok, so I have a simple word filter and it works just fine. I'd like to expand on it a bit and have it blot out not only filtered words, but works that contain the filtered words. You know like sh#thead and the like.
Here is what I have:
function parse_curse ($text)
{
$words = explode ('||', $this->set['word_censor']);
foreach ($words as $w)
{
$text = preg_replace ('/' . $w . '/i', '####', $text);
}
return $text;
}
I know it's a regex issue, the thing is that i'm not good at regex. lol. Help? 😕