Ok I see
something to start with :
ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", $var);
//return 1 if $var is an email address
But it doesn't work with email addresses within a text...
$var = "toto@toto.com" --> 1
$var = "write to toto@toto.com or nono@non.com" --> does not work
so you will have to find something to isolate words in a text
but I'm pretty sure you can find something in the tutorial of this site