Email validation – Regular Expressions

   <?php
   $email = "test@phpmoot.com";  
   $result = ereg("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$", $email, $trashed);

   if($result) {
     $match = "Valid";
   }
   else{
     $match = "Invalid";
  }
  echo "Email address validation about $email is " . $match;
  ?>

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

1 Comment

  1. avatarpréstamo

    Si necesitas un préstamo o un préstamo rápidamente online, consulta nuestro ranking.

Leave a Comment

Your email address will not be published. Required fields are marked *