• EasyStackTools189+ Free Tools
  • EVM Tools
    • Word Counter
    • Character Counter
    • Text Case Converter
    • Slug Generator
    • Remove Duplicate Lines
    • Lorem Ipsum Generator
    • Reverse Text
    • Remove Extra Spaces
    • Line Break Remover
    • Word Frequency Counter
    • Randomcase Text
    • Invert Text Case
    • Repeat Text
    • Replace Text
    • Truncate Text
    • Trim Text
    • Left-Pad Text
    • Right-Pad Text
    • Rotate Text
    • Circularly Rotate Text Left
    • Circularly Rotate Text Right
    • Delete Empty Lines
    • Shuffle Text Lines
    • Reverse Text Lines
    • Convert Spaces to Tabs
    • Convert Tabs to Spaces
    • Center Text
    • Right-Align Text
    • Justify Text
    • Word Wrap
    • Split into Words
    • Number Text Lines
    • Prefix Text Lines
    • Suffix Text Lines
    • Prefix and Suffix Text Lines
    • Join Text Lines
    • Split Strings
    • Find Longest Text Line
    • Find Shortest Text Line
    • Format Text Columns
    • Sort Text
    • Sort Numbers
    • Sort Words
    • Sort Text by Length
    • Sort IP Addresses
    • Filter Text Lines
    • Grep Text
    • Head Text
    • Tail Text
    • Extract Line Range
    • Find Letter Frequency
    • Find Phrase Frequency
    • Extract All Emails
    • Extract All URLs
    • Extract All Numbers
    • Text Statistics
    • Convert Text to Binary
    • Convert Binary to Text
    • Convert Text to Octal
    • Convert Octal to Text
    • Convert Text to Decimal
    • Convert Decimal to Text
    • Morse Code
    • UTF-8 Encode/Decode
    • Base32 Encode/Decode
    • Uuencode / Uudecode
    • Strip HTML Tags
    • Convert Text to HTML Entities
    • Remove Text Character Accents
    • Remove Text Punctuation
    • Add Thousands Separators
    • Add Backslashes
    • Strip Backslashes
    • Extract Regex Matches
    • Replace Regex Matches
  1. Home
  2. Text Tools
  3. Extract Regex Matches

Extract Regex Matches

Extract all regex matches from text. Show each match on a new line. Optional capture groups. Test and extract.

Read the guide

Matches (one per line)

Output will appear here...

Guide and examples

Extracting all matches of a regular expression from text usually means writing a script or using an editor. The Extract Regex Matches tool does it in the browser: paste text, enter a regex, and get every match (optionally by capture group)—no sign-up and no data sent to a server.

What does Extract Regex Matches do?

Extract Regex Matches is a free online tool that runs a regular expression on your text and returns all matches, optionally showing only specific capture groups. Each match can be shown on a new line. Capture groups are supported: you can show full matches or specific capture groups. Global flag is applied by default. Use it to pull out emails, URLs, dates, or any pattern from text; test a regex before using in code; or extract capture group values. All processing happens in your browser.

Key Features

  • All matches — Paste or type text and enter a regex pattern. The tool runs the pattern and lists all matches. Invalid regex will show an error.
  • Capture groups — Yes. You can show full matches or specific capture groups. Global flag is applied by default.
  • Any input — Paste or type text. No size limit for in-browser processing.
  • Instant result — Paste, enter pattern, view match list. Copy when ready.
  • Privacy-first — All processing happens in your browser. Your text is never sent to any server.
  • No account — Use as often as you need without sign-up.

How to Use Extract Regex Matches

  1. Open the Extract Regex Matches tool.
  2. Paste or type your text. Enter a regex pattern (e.g. \b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b for emails).
  3. View the list of matches (full match or capture groups). Copy when ready. Use the "Use tool" button on the docs page if you are reading this from the documentation.

Real Use Cases

  • Pull out emails, URLs, dates — Use a pattern and get every match on its own line. Combine with Extract All Emails or Extract All URLs for dedicated extractors; use this tool for custom patterns.
  • Test a regex before using in code — Verify that your pattern matches what you expect. See all matches and capture groups.
  • Extract capture group values — When you need only group 1 or group 2, show that group only. Useful for parsing logs or structured text.
  • Data extraction — Extract IDs, codes, or substrings that follow a pattern. Export for spreadsheets or further processing.
  • Audit content — Find every occurrence of a pattern (e.g. phone format, product codes) in a document.
  • Learning regex — Experiment with patterns and see matches in real time.

Why Use Extract Regex Matches Instead of Alternatives?

  • vs. Replace Text — Replace Text does literal find-and-replace. This tool uses regex and returns the list of matches, not replaced text.
  • vs. Grep Text — Grep Text returns full lines that match. This tool returns only the matched substring(s). Use the one that matches your goal.
  • vs. Filter Text Lines — Filter Text Lines keeps or removes lines by pattern. This tool extracts the matching parts. Use both as needed.
  • vs. Scripts — No coding. Works in any browser.

If no matches are found, check that the pattern is correct and that the text actually contains the pattern. Remember . does not match newline by default in some engines; use [\s\S] or the s flag if needed.

Benefits for Developers, Data Users, and Writers

  • Developers — Test regex and extract matches without running code.
  • Data users — Extract structured data from free text.
  • Writers — Find every occurrence of a pattern (e.g. placeholder, pattern) in content.

Common Mistakes

  • No matches found — Check that the pattern is correct and that the text actually contains the pattern. Remember . does not match newline by default in some engines; use [\s\S] or the s flag if needed.
  • Invalid regex — The tool will show an error. Fix the pattern (e.g. unescaped brackets, invalid quantifiers).
  • Expecting replace — This tool extracts matches; it does not replace. For replace use Replace Regex Matches.
  • Forgetting to copy — The result is not saved. Copy before closing the tab.

Frequently Asked Questions

What does extract regex matches do?

It runs a regular expression on your text and returns all matches, optionally showing only specific capture groups. Each match can be shown on a new line.

Are capture groups supported?

Yes. You can show full matches or specific capture groups. Global flag is applied by default.

What input does it accept?

Paste or type text and enter a regex pattern. The tool runs the pattern and lists all matches. Invalid regex will show an error.

Is my text stored?

No. All processing happens in your browser. Your text is never sent to any server.

When should I use extract regex matches?

Use it to pull out emails, URLs, dates, or any pattern from text; test a regex before using in code; or extract capture group values.

Why are no matches found?

Check that the pattern is correct and that the text actually contains the pattern. Remember . does not match newline by default in some engines; use [\s\S] or the s flag if needed.

Conclusion and Try the Tool

Extract Regex Matches gives you all matches in seconds: paste, enter pattern, copy. No account, no server round-trip. For find-and-replace with regex use Replace Regex Matches, for line-based matching use Grep Text, and for filtering lines use Filter Text Lines.

Use the Extract Regex Matches tool to get all regex matches.

Frequently Asked Questions

It runs a regular expression on your text and returns all matches, optionally showing only specific capture groups. Each match can be shown on a new line.

Related Tools

  • Replace Text

    Find and replace text with optional regex support. Replace first match, all matches, or use regular expressions.

  • Grep Text

    Search text for lines matching a pattern. Regex support. Show only matching lines or show line numbers.

  • Filter Text Lines

    Filter lines by text or regex. Include only matching lines or exclude matching lines. Keep or remove.

  • Word Counter

    Free online word counter tool. Count words, characters, sentences, and paragraphs instantly. Perfect for writers, students, and SEO professionals.