frega + code   25

Comparing E-mail Address Validating Regular Expressions
I wanted to find a regular expression to validate e-mail addresses, but when I searched I found dozens of slightly different versions of the same expression. Almost all of them had people leaving comments about how it failed to validate or invalidate some rare but completely valid/invalid address syntax. But dispite all the criticism, I couldn't find a definitive "best" expression. So, I setup arrays of some of the most promising expressions as well as a (hopefully) complete sampling of valid and invalid addresses. It's my philosophy that it's better to accept a few invalid addresses than reject any valid ones, so I'm shooting for 0 false-positives and as few false-negatives as possible. If you have any sample addresses or expressions that you think should be added to the list, or if you can further improve the best expression please e-mail me at:
code  email  regex  reference 
may 2010 by frega

Copy this bookmark:



description:


tags: