Last active
December 17, 2015 23:19
-
-
Save cesarfigueroa/5688172 to your computer and use it in GitHub Desktop.
Ruby email regular expression
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
EMAIL_ADDRESS = /\A[A-z0-9._%+-]+@[A-z0-9.-]+\.[A-z]{2,4}\z/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using
\A
and\z
instead of^
and$
per the recommendation of Bryan Helmkamp.