Is there a way to remove e-mail IDs and consecutive numbers from private messages sent between users?
This code was found online for email IDs. Can someone please advise? Thank you in advance.
/*remove email addresses from private messages
Buddypress remove email id from private messages
$replacement = "[removed]";
/*if you dont want any replacement text, replace the above line with
$replacement = "";
return preg_replace("/[^@\s]*@[^@\s]*\.[^@\s]*/", $replacement, $message);
/*the code is short and works in most cases but not full proof. Check http://www.linuxjournal.com/article/9585*/