Regex Text Extractor

Pull every matching part out of a text with a regular expression and optional capture groups.

Extract matches with a pattern

Matches will appear here, one per line.
No pattern applied yet.
Flags use the usual letters: g for all matches, i to ignore case, m for multiline, s for dotall and u for Unicode.

How to use the Regex Text Extractor

  1. Paste the text you want to search through.
  2. Enter a regular expression and the flags you need.
  3. Pick a capture group and press Extract matches to list every hit.

Features

Advertisement

Frequently Asked Questions

Common questions about the free online regex text extractor.

Paste your text, type a pattern such as a word or an email shape, then press Extract matches to list every hit.
The letters g, i, m, s and u are accepted. The global flag is always applied so every match is collected.
Brackets in a pattern create groups. Set the group number to output only that part instead of the whole match.
Group zero is the complete match. Choose a higher number to output the contents of that bracketed group.
Tick the positions box and each line gains the start and end index of the match inside the original text.
The pattern and the flags must match your text exactly. Check for stray spaces and remember case sensitivity.
No. The pattern runs in your browser, so the text you paste never leaves your device.
Yes. The extractor is responsive and works on phones, tablets and desktop browsers.

Last updated: October 10, 2026