VERBOSE MODE (still need to figure this out)
[A-PR-Y0-9]{3} # Area code prefix
-
[A-PR-Y0-9]{3} # 3-digit exchange
-
[A-PR-Y0-9]{4} # 4-digit suffix
//return eregi("^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$", $email);//original
// general
// - catches double dots in domain names
// - removed "a-z" from character groups as email is case insensitive
//return eregi("^[_\.0-9A-Z-]+@([0-9A-Z][0-9A-Z-]+\.)+[A-Z]{2,6}$", $email);
// domain part
// - added single letter domains, removed [0-9A-Z] from ([0-9A-Z][0-9A-Z-]+\.)
//return eregi("^[_\.0-9A-Z-]+@([0-9A-Z-]+\.)+[A-Z]{2,6}$", $email);
// - disabled 6 letter tlds in favor of 4, but added .museum, catches [email protected]
//return eregi("^[_\.0-9A-Z-]+@([0-9A-Z-]+\.)+[A-Z]{2,4}$", $email);
//return eregi("^[_\.0-9A-Z-]+@([0-9A-Z-]+\.)+([A-Z]{2,4}|museum)$", $email);
// - could NOT disable capturing w/ereg, switched to preg_match
// - and added ?: to subpattern (?:[0-9A-Z-]+\.)+[A-Z]{2,4}
//return preg_match("/^[_\.0-9A-Z-]+@(?:[0-9A-Z-]+\.)+(?:[A-Z]{2,4}|museum)$/i", $email);
// local part
// - added whitespace "=", "?", "^", "+", "{", "}", "~", removed escape for dot in char class
//return preg_match(/"^[ =?^+{}~_.0-9A-Z-]+@(?:[0-9A-Z-]+\.)+(?:[A-Z]{2,4}|museum)$/i", $email);
// - added no leading, trailing, nor double dots
// - moved dot out of class, and added repeating group
return preg_match
('/^[ =?^+{}~_0-9A-Z-]+(?:\.[ =?^+{}~_0-9A-Z-]+)*@(?:[0-9A-Z-]+\.)+(?:[A-Z]{2,4}|museum)$/i', $email);
// todo - 64 char limit
Copyright © 2025 Freedom Communications
Site designed and maintained by Freedom Communications | validate xhtml, css