I need to write this post so that I can remember to use it in the future.
Email addresses are allowed to have comments in them.
<username>+<comment>@<host>
[Edited 19-07-07 as I forgot to escape the >’s]
You can even include multiple +’s (or (\+.+)+ for those among us that love regex)
Just incase you can’t form the right query in a search engine, here is the very useful blog entry I came across:
Anders Jacobsen’s blog
-= Comments
1. Xavier Shay | July 13th, 2007 at 2:56 pm
Rule #1: Don’t ever use a regex to match an email unless the author provides RFC compliant tests. There are so many shit email regexes on the internet AND IT ANGERS ME
No comments:
Post a Comment