title: regex for email validation: where is the error?
body: <p>This sounds strange, but I've been using this function for quite a while now and "suddenly, from one day to the other" it  does not filter some addresses in the right way anymore. However, I cannot see why...</p>
  
  <pre><code>function validate_email($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 &amp; possibly subdomains
  
  '.'. # period
  
  '([a-z]+){2,10}/i'; # domain extension 
  
  if($email == '') { 
      return false;
  }
  else {
  $eregi = preg_replace($regex, '', $email);
  }
  
  return empty($eregi) ? true : false;
  }
  </code></pre>
  
  <p>e.g. "some@gmail" will be shown as correct, etc so it seems sth happened with the tld - does anybody could tell me why?</p>
  
  <p>Thank you very much in advance!</p>