How email matching works here
The pattern is deliberately practical, not strictly RFC 5322. Anything that looks like [email protected] is captured: letters, digits, underscores, dots, plus-signs and hyphens before the @; letters, digits, dots and hyphens after it; and at least one literal dot in the domain. Most real-world addresses pasted from emails, signatures, contact pages and CSVs match cleanly.
Plus-aliases such as [email protected] are preserved verbatim so you can still tell campaign tags apart. Trailing punctuation that sits next to an address (commas, full stops, brackets) is excluded by the character class, so "contact [email protected]." yields [email protected] with no trailing dot.
The output is one address per line in the order the addresses appear. Duplicates are kept; if you want them deduped, paste the result into remove duplicate lines afterwards. Need to validate or count the matches? Pipe the output into line counter.
How to use extract emails from text
- 1Paste your text into the input panel on the left.
- 2The output panel on the right shows every email address, one per line.
- 3Click Copy in the output header to copy the list.
- 4Click Download to save the matches as a plain-text file.
- 5Send the result to remove duplicate lines if you want unique addresses only.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What counts as an email here
Local part: letters, digits, dot, plus, minus, underscore
The character class [\w.+-]+ covers A-Z a-z 0-9 _ plus ., + and -. So alice, alice.smith, alice+news and alice_01 all match before the @.
Domain part requires at least one dot
The pattern [\w-]+\.[\w.-]+ requires a host, a literal dot, then a TLD or sub-segments. Bare hosts without a dot (alice@localhost) are skipped. Multi-level domains like [email protected] are captured in full.
Plus-aliases preserved
[email protected] stays as [email protected]. The plus is part of the address; the matcher does not strip it. Useful when you are auditing campaign tags or filter rules.
Trailing punctuation is excluded
Because ,, ;, ), ], ? and ! are not in the domain character class, they break the match. So "write to [email protected]." gives [email protected] with the full stop dropped.
Order preserved, duplicates kept
Addresses appear in the order they were found. Duplicates are not removed; for a unique list pipe the output into remove duplicate lines.
Worked example
The trailing comma and full stop drop off, the plus-alias is preserved, and the duplicate [email protected] appears twice because no dedupe is applied.
Reach [email protected] or [email protected] for sales. Support: [email protected], escalations: [email protected]. Campaign tag: [email protected].
Settings reference
| Behaviour | Effect on output |
|---|---|
| Local part characters | Letters, digits, underscore, dot, plus, hyphen. |
| Domain part characters | Letters, digits, dot, hyphen. At least one dot is required. |
| Plus-aliases | Kept intact. [email protected] is a single match. |
| Trailing punctuation | Dropped. "[email protected]," yields [email protected]. |
| Bare hostnames | Skipped. alice@localhost does not match (no dot). |
| Order and duplicates | Matches appear in source order. Duplicates are kept. |
FAQ
Is the matcher RFC 5322 compliant?
[email protected]. Edge cases like quoted local parts ("a b"@example.com) and IP-literal hosts are not matched. For everyday extraction from emails, signatures and CSVs, the pattern is more than enough.Are duplicate addresses removed?
Will obfuscated forms like "alice [at] example.com" match?
@. To catch obfuscated forms, run find and replace first to normalise [at] back to @ (and [dot] to .), then extract.Is anything sent to a server?
How do I extract addresses from an HTML page?
<a href="mailto:[email protected]"> still match directly though, because the matcher ignores surrounding tags.