Overview
What Extract Email Addresses does
Finds conventional email addresses, removes case-insensitive duplicates, and returns one address per line without sending the selection anywhere.
| Category | Text Editing & Formatting |
|---|---|
| Action type | JavaScript |
| Result | Copy the result |
| Internet | Not required |
Example
Action and outcome
| Action | Outcome |
|---|---|
| Extract Email AddressesSelected text: Email [email protected] or [email protected]; [email protected] is the same contact. | [email protected] [email protected] |
Workflow
Use Extract Email Addresses
Follow these steps to extract unique email addresses from selected text with ActionClip.
- Select the text you want to use.
- Choose Extract Email Addresses from ActionClip.
- Review the result, then copy it where you need it.
Before you add it
Requirements and privacy
- Before you start: No setup required.
- Your selected text: Runs locally in ActionClip’s JavaScript sandbox. Selected text does not leave your Mac.
Inspect before installing
Action configuration
The definition below is included so you can inspect how the action works before downloading it.
JavaScript definition
function run(selected_text) {
const matches = selected_text.match(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi) || [];
const seen = new Set();
const emails = [];
matches.forEach((email) => {
const key = email.toLowerCase();
if (!seen.has(key)) {
seen.add(key);
emails.push(email);
}
});
return emails.length ? emails.join("\n") : "No email addresses found.";
}