Skip to content

Instantly share code, notes, and snippets.

@okeydoke
Created January 10, 2019 01:44
Show Gist options
  • Save okeydoke/d3faf41560034205513c565cce77c42f to your computer and use it in GitHub Desktop.
Save okeydoke/d3faf41560034205513c565cce77c42f to your computer and use it in GitHub Desktop.
// Taken from regex at bottom of this section https://html.spec.whatwg.org/#e-mail-state-(type=email)
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment