title: php email regex
body: <p>What is wrong with this regex?</p>
  
  <pre><code>function validateEmail($email){
      if (eregi("^([a-z]|[0-9]|\.|-|_)+@([a-z]|[0-9]|\.|-|_)+\.([a-z]|[0-9]){2,3}$", $email, $arr_vars) &amp;&amp;
  
      !eregi("(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)", $email, $arr_vars)){
      return true;
  
      }else{
      return false;
      }
  }
  </code></pre>
  
  <p>When used:</p>
  
  <pre><code>$email = "hello@hello.info";
  if (validateEmail($email) != 1){
  //show error
  }
  </code></pre>
  
  <p>It returns false and shows an error, whats wrong?</p>