Skip to content
Pattern Extractor

Pattern Extractor

Extract emails, URLs, phones, IPs, UUIDs, dates, and more, with live counts and CSV/JSON export.

2 emails found
  • hello@textbench.dev
  • support@jainath.com

The Pattern Extractor pulls structured data out of messy text: server logs, scraped pages, CSV dumps, support tickets, chat exports, or a PDF you copied into a textarea. It recognises twelve pattern types: emails, URLs, phone numbers, IPv4 and IPv6 addresses, MAC addresses, UUIDs, dates (ISO yyyy-mm-dd and US mm/dd/yyyy), Markdown link URLs, @mentions, hex colors, and hashtags. The page is fully static, so every match is computed inside your browser tab. Nothing you paste or drop is uploaded anywhere.

How to use

  1. Add your text: paste it in, click Paste or Sample, or drag and drop a .txt, .csv, or .log file (up to 5 MB) onto the input.
  2. Pick a pattern chip. Each chip carries a live count for the current text, so you can see at a glance that there are, say, 3 IPv4 addresses and 1 UUID before clicking anything.
  3. Toggle Unique only to collapse duplicates or keep every occurrence. Your choice is saved locally for next time.
  4. Copy a single match from its row, hit Copy all, or export the list as TXT, CSV, or JSON. With the URLs chip selected, Open all launches every link in a background tab.

Worked example

Paste this snippet and select Phone numbers:

Call +1 (415) 555-0142 or the office line 020-7946-0958.
The card on file, 4111111111111111, stays out of the results.

The result list shows exactly two matches:

+1 (415) 555-0142
020-7946-0958

The 16-digit card number is ignored because the phone matcher refuses to start or end inside a longer digit run, a common failure mode in naive extractors that would happily report a "phone number" buried in your card details.

Edge cases worth knowing

  • IPv4 matching validates each octet, so 256.300.1.1 and 999.999.999.999 are rejected rather than reported as addresses.
  • Letter-only hex codes like #fafafa count as hex colors, not hashtags; #textbench still counts as a hashtag.
  • URLs keep balanced parentheses, so Wikipedia-style links such as https://en.wikipedia.org/wiki/Tool_(band) survive intact, while a stray closing bracket from the surrounding sentence is trimmed.
  • Markdown links extract just the URL from [label](url), and @mentions never fire on the domain half of an email address.

FAQ

More questions? Browse the full FAQ.

Once you have a clean list of matches, you can remove duplicate lines with the dedupe tool or sort the extracted lines alphabetically or by length before pasting them into a spreadsheet or script.

Search tools

Search all Textbench tools