? Earlier 3 items total Later ?

On this page:?

Validate an email address

I don't remember where this came from, but it's very useful for validating input from a form


function valid_email($email) {

  if( eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) ) { 
    return true;
  }
  else { 
    return false;
  }

}

Pretty darn good Email validator

This regular expression was written by a friend of mine according to the email spec RFC2822. It should be near 100% coverage of email addresses assuming no leading or trailing whitespace, and no internal linebreaks (you might try 's' at the end to remedy the line break thing but no guarantees).

/^[-^!#$%&'*+\/=?`{|}~.\w]+@[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])*(\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])*)+$/

extract email addresses




Context: http://forum.textdrive.com/viewtopic.php?pid=46783

? Earlier 3 items total Later ?