Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Answer: How do I validate an email address?

( #581285=categorized answer: print w/ replies, xml ) Need Help??

Q&A > regular expressions > How do I validate an email address? contributed by greenFox

Recipe 6.19, "Matching a Valid Mail Address", in The Perl Cookbook gives a broader coverage of this topic and is well worth a read. In it, Tom Christiansen refers to his attempt at a regular expression (while admitting that it's less than perfect) which can be found in his script, ckaddr. It is based on a regular expression in Recipe 18.9 of Mastering Regular Expressions. All of this proves (to me at least) just how tricky matching an email address really is.

Comment on Answer: How do I validate an email address?
Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2015-11-30 16:58 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (777 votes), past polls