Skip to content

Instantly share code, notes, and snippets.

@mgd020
Created September 8, 2016 02:31
Show Gist options
  • Save mgd020/7e121bbae2b5557301b66febcad8e17c to your computer and use it in GitHub Desktop.
Save mgd020/7e121bbae2b5557301b66febcad8e17c to your computer and use it in GitHub Desktop.
email regex pattern (python format)
https://regex101.com/r/nV4rB0/1
^(([A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~]+(\.[A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~]+)*)|\"([A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~\.\(\)\,\:\;\<\>\@\[\] ]|\\\\|\\\")+\")(\.(([A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~]+(\.[A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~]+)*)|\"([A-Za-z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~\.\(\)\,\:\;\<\>\@\[\] ]|\\\\|\\\")+\"))*@(([A-Za-z0-9]+(\-[A-Za-z0-9]+)*)(\.([A-Za-z0-9]+(\-[A-Za-z0-9]+)*))*|\[((\d{1,3}(\.\d{1,3}){3})|IPv6(\:[a-zA-F0-9]{0,4}){1,7})\])$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment