Created
April 29, 2014 05:24
-
-
Save vincent178/11391222 to your computer and use it in GitHub Desktop.
email regex
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[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i | |
/ start of regex | |
\A match start of a string | |
[\w+\-.]+ at least one word character, plus, hyphen, or dot | |
@ literal "at sign" | |
[a-z\d\-.]+ at least one letter, digit, hyphen, or dot | |
\. literal dot | |
[a-z]+ at least one letter | |
\z match end of a string | |
/ end of regex | |
i case insensitive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment