Alternative for deprecated PHP function: eregi_replace
preg_replace
http://php.net/manual/fr/function.preg-replace.php
$pattern = “/([a-z0-9][_a-z0-9.-]+@([0-9a-z][_0-9a-z-]+.)+[a-z]{2,6})/i”;
$replace = “<a href=”mailto:\1″>\1</a>”;
$text = preg_replace($pattern, $replace, $text);
Fuente: https://stackoverflow.com/questions/2084881/alternative-for-deprecated-php-function-eregi-replace