Extract email addresses from free-form textβnotes, log lines, HTML snippets, or support ticketsβand return a deduplicated list.
How it works
A practical regular expression scans for local-part @ domain patterns with a multi-label host and a final TLD of at least two letters. Matches are collected in order; duplicates that differ only by letter case are collapsed so each address appears once. When nothing matches, the helper returns a stable no-emails-found reason instead of an empty success.
When to use it
- Pull contacts from a pasted thread before importing into a CRM
- Audit configuration dumps or CI logs for accidental PII
- Build a quick list of addresses mentioned in a markdown export
Limitations
The matcher is intentionally simpler than RFC 5322. Unusual quoted local parts, internationalized domain names, and comments inside addresses may be missed or over-matched. Extracted strings are not verified by SMTP; treat them as candidates. Empty input is rejected.
Example
From Contact alice@example.com and Alice@Example.com plus support@toolplaza.app, the output lists alice@example.com and support@toolplaza.app on separate linesβthe second Alice address is dropped by case-insensitive dedupe.