Email Validation PHP Regex


/ Published in: PHP

Full email validation with regex.


Copy this code and paste it in your HTML
  1. $regex = "([a-z0-9_.-]+)". # name
  2. "@". # at
  3. "([a-z0-9.-]+){2,255}". # domain & possibly subdomains
  4. ".". # period
  5. "([a-z]+){2,10}"; # domain extension
  6. $eregi = eregi_replace($regex, '', $email);
  7. $valid_email = empty($eregi) ? true : false;

URL: tricksbycinger.blogspot.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.