Skip to content

Regex Match Extractor

Pull every piece of text that matches a pattern out of a long document and get it as a tidy list.

Processed locally in your browser

Options

g global · i ignore case · m multiline · s dotAll · u unicode · y sticky · d indices

0 chars · 0 lines
The result will appear here.

What is Regex Match Extractor?

The Match Extractor applies a regular expression to your text and returns only the matches, one per line, instead of the whole document. It is the quickest way to collect e-mail addresses, phone numbers, prices, hashtags, IP addresses, IDs or URLs from logs, exports and web page text.

Choose what to output: the whole match (group 0), a numbered capture group or a named group. Then remove duplicates, sort A → Z, Z → A or by length, and pick the format: one per line, comma-separated or a JSON array. The pattern is always global and runs in a time-limited worker; results are capped at 10,000.

How does it work?

  1. Enter the pattern (and flags such as i for case-insensitive).
  2. Paste the source text and, if needed, set the output group (0 for the whole match, 1 for the first group, or a group name).
  3. Choose unique values, sorting and output format, then copy or download the extracted list.

Common use cases

  • Collecting all e-mail addresses or URLs from a page dump.
  • Extracting order IDs, invoice numbers or error codes from a log.
  • Pulling only the value part of key=value pairs with a capture group.
  • Producing a JSON array of tokens for a script or test fixture.

Examples

Try this input in the tool above:

Write to alice@example.com or bob.smith@test.org. Duplicates: alice@example.com. Not an email: foo@bar

Privacy

Regex Match Extractor runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

It extracts what the pattern matches; it does not validate that the results are real (a match for an e-mail pattern is not proof the mailbox exists).

Frequently asked questions

How do I extract only part of each match?

Put that part in parentheses and set "Output group" to its number. For (\w+)=(\d+), group 2 outputs just the numbers.

Do I need the g flag?

No. The extractor is always global, so every match is returned.

How are empty or unmatched groups handled?

Matches where the chosen group did not participate or is empty are skipped.

More tools in Developer Tools →