Hi please help me I am using this code to filter some words but the the problem is it doesn't match the exact word and in stead it just blocks words that contain the letters from my word.
For example: ".com" I type commander and the word gets blocked please help.
$badwords = explode('|', 'http|www|.com');
foreach($badwords as $badword)
{
if(preg_match("/$badword/", $post->data['message'], $match))
{
$post->errors['badwords']['error_code'] = "Warning message goes here";
}
}