DataToolsLab
Text Tools

Regex Tester

Test regular expressions against text with match details.

Loading tool…

What is Regex?

A regex playground: enter a pattern and flags, paste test text, and inspect each match with its index and capture groups.

How it works

The pattern compiles into a RegExp with your flags; exec() walks the text collecting matches (with a guard against runaway zero-width loops).

  1. Enter your input. Type or paste your input into the field above — the tool responds instantly.
  2. Review the result. Output updates live as you type. Everything runs entirely in your browser.
  3. Copy or download. Use the Copy button to grab the result, or Download to save it as a file.

Examples

Pattern validation

Test a pattern against candidate strings to see matches, captures, and flags in real time — the fastest way to debug a regex.

Common mistakes

Catastrophic backtracking

Nested quantifiers like (a+)+ can hang on certain inputs. The tester warns when a pattern risks pathological behavior.

Frequently asked questions

Which regex flavor is used?

JavaScript (ECMAScript) syntax, with flags for global, case-insensitive, multiline, and dot-all.

Can I see capture groups?

Yes — every match highlights its groups and named captures.

Online