Skip to content
Tezmy Tools

Regex Match Extractor

Pull every match of a regular expression out of a text

For example \d+ finds numbers; brackets make a group you can pull out.

0 is the whole match, 1 is the first bracketed part.

3 matches found.

Runs in your browser. Nothing is uploaded.

About the Regex Match Extractor

A regular expression describes a pattern of text, and this tool lists everything in your text that fits it. Type a pattern such as \d+ for numbers or [A-Z]{2}\d{4} for codes, paste the text and every match appears on its own line. If your pattern has brackets, you can choose to output just one bracketed part, for example the digits after a hash sign. Matches can be de-duplicated and capital letters ignored. The count is shown. It runs in your browser and the text is not uploaded.

Updated October 2026

How to use the Regex Match Extractor

  1. 1Paste your text into the left box.
  2. 2Type a regular expression in the pattern box.
  3. 3Set which part to output: 0 for the whole match, 1 for the first bracketed part.
  4. 4Tick the options to ignore capitals or remove repeated matches.
  5. 5Copy the matches or download them.

What extraction is good for

Pulling order numbers out of emails, hashtags out of posts, dates out of a log or codes out of a document are all the same job: describe the pattern and collect the matches. Doing it by hand misses items; a pattern does not.

The output is one match per line, which pastes neatly into a spreadsheet column.

    Patterns to start with

    \d+ finds numbers. [A-Za-z]+ finds words. \d{4}-\d{2}-\d{2} finds dates in year-month-day form. #(\w+) with group 1 finds hashtags without the hash. Test on a small sample first and widen the pattern step by step.

    • Numbers: \d+
    • Words: [A-Za-z]+
    • Dates: \d{4}-\d{2}-\d{2}
    • Hashtags: #(\w+) with group 1

    Good habits

    Keep patterns as simple as you can. Very complicated patterns on very long texts can be slow. If nothing matches, try a looser pattern or turn on the ignore-capitals option.

      Example

      In the text Order #1042 shipped on 2026-10-03, Order #1043 is due 2026-10-09, with the pattern #(\d+) and group 1 you get 1042 and 1043. With the pattern \d{4}-\d{2}-\d{2} and group 0 you get both dates. Ticking the repeats option removes duplicates from the list.

      If your pattern contains a bracket pair but you ask for group 2, the tool tells you how many bracketed parts it really has.

        Phone and computer

        On a phone, paste into the box, adjust the pattern and group number, and tap Copy to carry the result into another app. On a computer you can also download it as a file. The two boxes sit side by side on a wide screen and one above the other on a narrow one, so you can compare input and result without zooming. Nothing you paste is uploaded or stored.

          Good to know

          Matches that are empty are left out, so a pattern such as \d* that can match nothing does not flood the list. The pattern is applied to the whole text at once, so a match can span a line break if the pattern allows it. The ignore-capitals option applies to the pattern, not to the output. Build and test your pattern in Regex Tester before extracting. For common jobs, Email Extractor and Number Extractor are ready-made and need no pattern at all.

            Features

            • Lists every match, one per line
            • Output a bracketed group
            • Optional case-insensitive search
            • Optional removal of repeats
            • Clear error for invalid patterns
            • Private: nothing is uploaded

            Frequently asked questions

            How do I extract all numbers from a text?

            Use the pattern \d+ and group 0. Every run of digits is listed on its own line.

            What is the group number?

            0 outputs the whole match. 1 outputs what the first pair of brackets captured, 2 the second pair, and so on.

            Why does my pattern give an error?

            Brackets or other special characters may be unbalanced. The message tells you the pattern is not valid; check the brackets and slashes.

            Does it find overlapping matches?

            No. As in most tools, once a piece of text is matched it is not used again for the next match.

            What is the difference from the Regex Tester?

            The tester helps you build a pattern and see it highlighted. This tool is for pulling out the results as a clean list.

            Is my text uploaded?

            No. The pattern runs in your browser.

            Related tools