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· Your data stays in your browser.
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?
- Enter the pattern (and flags such as i for case-insensitive).
- 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).
- 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.
Related tools
Regex Tester
Write a pattern, paste some text and see every match highlighted, with its position and capture groups.
Developer Tools
Regex Replace
Rewrite text with a regex pattern and a replacement template that can reuse the captured pieces.
Developer Tools
Regex Escape
Turn any literal text into a safe regex pattern by escaping the characters that have a special meaning, or reverse it.
Developer Tools
Remove Duplicate Lines
Paste a list and keep only unique lines, in the original order or sorted, with a count of what was removed.
Text Tools
Sort Lines
Order any list one item per line: A to Z, Z to A, natural, numeric or by length.
Text Tools
Extract Domain from URL
Paste URLs, one per line, and get the domain, hostname, subdomain or suffix of each in bulk.
Developer Tools
CSV Column Extractor
Keep only the columns you need from a CSV, chosen by header name, position or range, in the order you list them.
JSON & Data