Ciao a tutti,
ho un semplice form di contatti che utlizza questa funzione PHP per la validazione dell'indirizzo e-mail

Codice PHP:
<?php
function ValidateEmail($email)
{
/*
Name: Letters, Numbers, Dots, Hyphens and Underscores
@ sign
Domain (with possible subdomain(s) ). Contains only letters, numbers, dots and hyphens (up to 255 characters)
. sign
Extension: Letters only (up to 10 (can be increased in the future) characters)
*/

$regex "([a-z0-9_\-\.]+)"# name

"@"# at

"([a-z0-9\-\.]+){2,255}"# domain & possibly subdomains

"\."# period

"([a-z]+){2,10}"# domain extension 

$eregi eregi_replace($regex''$email);

return empty(
$eregi) ? true false;
}
?>
la funzione eregi_replace è deprecated, perciò ho guardato in rete e sostituito con preg_replace


Codice PHP:
$eregi preg_replace($regex''$email); 
Mi esce questa roba qui
Warning: preg_replace(): Unknown modifier '@' in /web/htdocs/betanew/functions.php on line 23 OK
(la linea 23 è proprio quella che ho sostituito in effetti).

Cosa devo fare?

Grazie