Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/03/2013, 11:18
KaLel191
 
Fecha de Ingreso: marzo-2013
Mensajes: 6
Antigüedad: 11 años, 2 meses
Puntos: 0
Pregunta problemas con la funcion preg_match

el problema es el sigiente, intento instalar un script en xampp para poder editarlo, el problema eske cuando yego al paso dos me tira un error este..
Warning: preg_match(): No ending delimiter '^' found in C:\xampp\htdocs\prueva\install\index.php on line 165

El codigo es este...

function check_email($email)
{
$email_error = false;
$Email = htmlspecialchars(stripslashes(strip_tags(trim($ema il))));
if ($Email == '') { $email_error = true; }
elseif (!preg_match('^([a-zA-Z0-9._-])+@([a-zA-Z0-9._-])+\.([a-zA-Z0-9._-])([a-zA-Z0-9._-])+', $Email)) { $email_error = true; }
else {
list($Email, $domain) = explode('@', $Email, 2);
if (! checkdnsrr($domain, 'MX')) { $email_error = true; }
else {
$array = array($Email, $domain);
$Email = implode('@', $array);
}
}