Skip to content

Instantly share code, notes, and snippets.

@JeffM33
JeffM33 / gist:03e19d6aaa87bb3b24efc50f6d814800
Last active September 24, 2021 04:39
Regex Email tutorial
# Regex code to verify email Tutorial
Good afternoon, this regex code is to show you how to verify that a piece of json is in fact an email.
## Summary
The regex i will be describing will show several different characteristics that an email can have. It will get the information for an email before the @ symbol. it must include a @ symbol. It has to contain text after the @ symbol. It must contain a \., and then it has to have a 2-5 ended for example .us, .gov, etc. I hope you find this tutorial useful!
/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/i