Cheatsheet Pages / Regex Cheatsheet
A practical regex for email addresses
You need to find or sanity-check email addresses in text — without rejecting real ones.
Patterns use the syntax shared by PCRE / Python / JavaScript; engine differences are flagged in the cheatsheet where they matter. Test any pattern at regex101.com — and pick the matching engine.
[\w.+-]+@[\w-]+\.[\w.]+
# matches: name@example.com, first.last+tag@sub.domain.co
Good to know
No regex validates email perfectly (the RFC is absurd); this loose pattern catches real-world addresses without false rejections.
