Skip to content

Instantly share code, notes, and snippets.

@xofred
Created December 31, 2020 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xofred/b3bc6191a4b4191d7f475279c00ff2e1 to your computer and use it in GitHub Desktop.
Save xofred/b3bc6191a4b4191d7f475279c00ff2e1 to your computer and use it in GitHub Desktop.
# credit
# https://www.abstractapi.com/guides/how-to-validate-an-email-address-in-ruby
# valid
"mymail@myserver.com" =~ URI::MailTo::EMAIL_REGEXP
# invalid
"wrong" =~ URI::MailTo::EMAIL_REGEXP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment