Regex Match Extractor
About this tool
About Regex Match Extractor
Paste a log file, an email thread, an HTML page or a spreadsheet column and pull out exactly the pieces you need. Pick a preset for email addresses, URLs, numbers, hashtags, @mentions, IPv4 addresses, phone numbers, ISO dates, quoted strings or key=value pairs, or write your own JavaScript regex. By default you get the whole match; type a group number or a group name to extract just that capture group, such as only the domain of each email. Remove duplicates (optionally ignoring case), sort naturally so 9 comes before 10, trim stray spaces, and choose the output: one per line, comma separated, a custom separator, a JSON array, or CSV with one column for every capture group. The counts show how many matches were found and how many were unique. Matching runs in a background worker with a time limit, so even large files stay responsive, and the text never leaves your browser. An optional AI button, using your own AI key, can write the pattern from a description of what you want to pull out.
Built and maintained by Abhi JainUpdated
How to Extract Matches with Regex
- 1
Choose what to find
Pick a Preset such as Email addresses or URLs, or type your own pattern and flags.
- 2
Add your text
Paste text into the Text panel, click Open to load a file, or click Sample.
- 3
Pick a group and output
Set Group to 0 for the whole match or a group number or name, then choose the Output format and Sort order.
- 4
Copy or download
Tick Remove duplicates if needed, then copy the extracted list or download it.
Regex Match Extractor: questions and answers
How do I extract all email addresses from text?
Choose the Email addresses preset, paste the text, and keep Remove duplicates ticked. Every address appears one per line on the right. Tick Ignore case for duplicates so that Bob@Example.com and bob@example.com count once.
How do I extract only a capture group?
Put the part you want inside brackets in the pattern, for example ([\w.+-]+)@([\w.-]+) to capture the user and the domain, then enter 2 in Group to extract only domains. With a named group like (?<domain>…) you can type the name instead.
Do I need the g flag?
No. The extractor always searches the whole text for every match, whether or not g is on.
What does the CSV output contain?
One row per match, with the whole match in the first column and one column per capture group, named after the group if it has a name. It opens directly in Excel or Google Sheets.
Is there a size limit?
Files of several megabytes work. Matching stops at 100,000 matches and tells you so, and a pattern that takes more than two seconds is stopped with an explanation instead of freezing the tab.
Can AI write the extraction pattern?
Yes, optionally. Click AI, describe what to pull out (say, order IDs like ORD-12345) and apply the checked pattern. It uses your own AI key and sends your description plus up to 4,000 characters of the text, directly from your browser to your provider. Without a key the extractor works the same and nothing is sent.
Related Tools
- Regex TesterTest JavaScript regular expressions live with highlighted matches, capture groups, replace preview and plain-English errors.
- Regex SplitterSplit text on a regex or plain delimiter, keep or drop the delimiters, limit the splits, and get lines, a JSON array or CSV.
- Regex LibraryReady-made, tested regex patterns for emails, URLs, IPs, dates, phone numbers, Indian PAN, GSTIN, PIN and more, with code for five languages.
- Whitespace Visualizer & CleanerReveal tabs, NBSP, zero-width characters and mixed line endings, then clean them.
- Extract LinksList every web link, page link and typed URL in a PDF.