Skip to content
Jellykit

Regex Match Extractor

Pull every match of a regular expression, or one capture group, out of a text as a list, CSV or JSON.

  • Runs on your device
  • Works in the background
Loading tool

About Regex Match Extractor

Paste a log, an export or a page of notes, write a JavaScript regular expression, and get back just the parts it matches: every email address, every order number, every hashtag. Take the whole match, one capture group by number or name, or all the groups at once as columns.

The result is one item per line, CSV ready for a spreadsheet, or a JSON array for code, with duplicates removed if you like. Up to 100,000 matches are extracted.

How it works

  1. The pattern runs as a JavaScript regular expression with the g flag always on, so every match is found, left to right.
  2. Whole match takes the full text matched; One group takes a numbered or named group; All groups gives one column per group, left empty (or null in JSON) where a group did not take part.
  3. Matching happens in a background worker. A pattern that runs for more than three seconds is stopped, so a runaway expression cannot freeze the page.
  4. Remove duplicates keeps the first time each value appears, in the original order.

Questions

Which regular expression syntax does it use?

JavaScript’s, as built into your browser: named groups, lookahead, \p{…} classes with the u flag and lookbehind in current browsers. It is close to PCRE and Python for everyday patterns.

How do I extract only part of each match?

Put that part in parentheses and choose One group. For example (\d{4})-\d\d-\d\d with group 1 gives just the year of each date. Named groups like (?<year>\d{4}) can be chosen by name.

What happens with values that contain commas or line breaks?

In CSV they are quoted, with inner quotes doubled, so a spreadsheet reads them as one cell. In JSON they are escaped. In Lines output they are written as they are, so prefer CSV or JSON for such data.

Is there a limit?

Text up to 5 MB, and the first 100,000 matches. If the limit is reached the tool says so, and you can narrow the pattern or split the text.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.