GitShow/sindresorhus/email-regex
sindresorhus

email-regex

Regular expression for matching email addresses

by sindresorhus
Star on GitHubForknpm

JavaScript

150 stars17 forks8 contributorsQuiet · 1y agoSince 2014v6.1.0MIT

Meet the team

See all 8 on GitHub →
sindresorhus
sindresorhus20 contributions
Richienb
Richienb3 contributions
fibo
fibo1 contribution
jamiekyle-eb
jamiekyle-eb1 contribution
kevva
kevva1 contribution
moetezch
moetezch1 contribution
SamVerschueren
SamVerschueren1 contribution
evagy
evagy1 contribution

Languages

View on GitHub →
JavaScript96.1%
TypeScript3.9%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
JanisE
Why is foo@bar allowed?ClosedIssue

Why is foo@bar allowed? Is that really a valid e-mail address?

JanisE · 1mo ago
Richienb
Become RFC 5322-compliantMergedPR

The perfect email regex It turns out that the parts of rfc 5322 responsible for defining what an email is, can be cross-compiled 1:1 to regex. At some point I will publish this abnf to regex converter (update: published at https://github.com/Richienb/abnf-regex). (I am also waiting for this PR which would improve the optimisation phase https://github.com/DmitrySoshnikov/regexp-tree/pull/269) TODO: [x] Seperate out repetitive parts [x] Add option to allow ? https://github.com/sindresorhus/email-regex/issues/15 [x] Add option to allow domain part with only 1 part? https://github.com/sindresorhus/email-regex/issues/2#issuecomment-506979632 Fixes #9, fixes #2, fixes #15

Richienb · 11mo ago
Richienb
Optimize regexMergedPR

Regex size is approximately halved Notable changes: / and / are merged because they match the same thing Don't match folding white space (FWS) because it is not used in the actual email, but rather to format the email if it is too long for a single line of an email message. This technically removes the use case of extracting emails from a large dataset of text data that might contain email messages, if those emails span multiple lines

Richienb · 1y ago
Structured data for AI agents

Repository: sindresorhus/email-regex. Description: Regular expression for matching email addresses Stars: 150, Forks: 17. Primary language: JavaScript. Languages: JavaScript (96.1%), TypeScript (3.9%). License: MIT. Latest release: v6.1.0 (1y ago). Open PRs: 0, open issues: 0. Last activity: 1y ago. Community health: 71%. Top contributors: sindresorhus, Richienb, fibo, jamiekyle-eb, kevva, moetezch, SamVerschueren, evagy.

·@ofershap

Replace github.com with gitshow.dev