Skip to content

How to extract emails, URLs and numbers from unstructured text

Pull candidate addresses and values from notes or logs, inspect their context, choose duplicate rules, and export a list without mistaking matches for verified data.

By ToolsNow · Published · updated

To pull addresses out of an email thread or links out of a log, select the type of value you need and keep the surrounding text available while you check the results. A short reviewed list is more useful than an unfiltered export containing dates, references and unrelated contacts.

The extraction tool finds text patterns. An email match is not proof that a mailbox receives mail; a URL match is not proof that the destination exists or is safe.

Start with one type of match

Paste the text and select Email addresses, URLs, Phone-like numbers or another relevant type. Turn off types you do not need. Selecting whole numbers in a document full of dates and order IDs will produce numbers from those fields too.

Use Show surrounding text to inspect built-in matches in context. This helps distinguish a current contact from an old quoted signature, or a phone-like value from an invoice number.

Keep the source document until the list is checked. Once values are exported without context, it is harder to tell what they referred to.

Email matching deliberately covers a limited format

The built-in email pattern looks for letters, digits and selected punctuation before @, followed by a domain containing a dot. It handles an ordinary example such as [email protected] and leaves off a sentence’s trailing full stop.

It does not implement the full email-address grammar. Quoted local parts, internationalised addresses and unusual formats may be missed or partly matched. A document converted badly from PDF can also join adjacent text into a false candidate.

The practical question is whether the matches correspond to addresses in your source. Syntactic matching alone cannot confirm ownership, current use or deliverability.

Check where each URL ends

A link may contain punctuation that is also used by the surrounding sentence. For this input:

See https://example.com/docs/(v2), or https://example.org/a.

The local tool returns:

https://example.com/docs/(v2)
https://example.org/a

It trims trailing sentence punctuation and removes one unmatched closing parenthesis at the end. That is a useful heuristic, not a complete URL parser: more complicated punctuation can need manual correction.

It recognises http://, https://, ftp:// and bare www. starts. A bare domain without one of those prefixes may not be found. Results are displayed as text rather than automatically opened as links.

Phone-like numbers need a second look

The tool filters candidate runs to 7–15 digits after punctuation is removed. That lower bound is a local heuristic, not a rule that all telephone numbers have at least seven digits. E.164 defines a maximum of fifteen digits for international numbers; it does not validate every digit string of that length.

Dates, account numbers and order references can pass the filter. Formatting can also cause a real phone number to be missed, split, or joined to a nearby number. Review country codes and extensions against the source.

If all the values follow a known prefix or identifier format, a custom pattern may give a more useful list than a broad phone-number search.

Decide what should count as a duplicate

Remove duplicates combines equal matches of the same type and keeps an occurrence count. Ignore case when comparing broadens equality: [email protected] and [email protected] are merged when it is enabled, with the first spelling retained.

Use that option deliberately. Email domains are case-insensitive, but the local part before @ is not guaranteed to be. URL paths and query values can be case-sensitive too: /Report and /report need not be the same resource. The option compares the whole value, not just its domain.

It also does not normalise phone punctuation, remove email aliases or prove that two differently written values identify the same person.

Use a specific custom pattern

For invoice identifiers shaped like INV-1234, try:

\bINV-\d{4}\b

This matches four digits after the uppercase prefix, with word boundaries to avoid taking the first four digits of INV-12345. Enter the pattern without slash delimiters. The custom field uses JavaScript regular expressions and returns the full match, not just a capture group.

Avoid needlessly nested repetition such as (a+)+b. The custom-pattern worker has a two-second timeout and a 20,000-match cap, but narrowing the input and pattern makes results easier to inspect as well.

Custom matches are currently appended to the built-in results. The headline total, surrounding-text option and ordering do not fully cover that combined list. Inspect custom results directly rather than relying on those summaries for an audit count.

Export the reviewed list

Copy the values or download TXT, CSV or JSON. The on-page table shows up to 500 rows; downloads include the collected results beyond that display limit. Check for a truncation or timeout message before treating an export as complete.

Extraction runs locally in the page, but the exported file can still contain personal information or credentials from the source. Include only the context the recipient needs. Finding an address in a document does not establish permission to contact its owner.

Sources and further reading

Last reviewed 2 October 2026.

Published by ToolsNow. Read how tools and sources are checked.

Found a mistake or an outdated detail? Send a correction with the article title and the detail to review.