In the stack-overflow question here , it was explained that you can remove emails with this code:
$pattern = "/[^@\s]*@[^@\s]*\.[^@\s]*/";
$replacement = "[removed]";
preg_replace($pattern, $replacement, $string);
This removes stuff like johndoe@gmail.com - how do I modify the regular expression so that I remove something like @johnDoe from a chunk of text?
I really don't understand regular expression that well.