Created
November 11, 2014 03:57
-
-
Save hoangitk/c769952c894ee5425f87 to your computer and use it in GitHub Desktop.
Email validation follow RFC 2822
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @"^((?>[a-zA-Z\d!#$%&'*+\-/=?^_`{|}~]+\x20*" + @"|""((?=[\x01-\x7f])[^""\\]|\\[\x01-\x7f])*""\x20*)*" + @"(?<angle><))?" + @"((?!\.)(?>\.?[a-zA-Z\d!#$%&'*+\-/=?^_`{|}~]+)+" + @"|""((?=[\x01-\x7f])[^""\\]|\\[\x01-\x7f])*"")" + @"@" + @"(((?!-)[a-zA-Z\d\-]+(?<!-)\.)+[a-zA-Z]{2,}" + @"|\[" + @"(((?(?<!\[)\.)(25[0-5]|2[0-4]\d|[01]?\d?\d)){4}" + @"|[a-zA-Z\d\-]*[a-zA-Z\d]:" + @"((?=[\x01-\x7f])[^\\\[\]]|\\[\x01-\x7f])+)" + @"\])" + @"(?(angle)>)$"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment