Design Drifter
All Tools

Regex Tester

Test a regular expression against text.

Developer

Processed locally. Your input never leaves your browser.

//

About

Tests a regular expression against text entirely in your browser. Matches and capture groups update as you type (debounced). The regex actually runs in a background Web Worker with a 1.5-second timeout, so a pathological pattern gets stopped instead of freezing the page — the catastrophic-backtracking warning shown before running is only a best-effort heuristic hint, not a guarantee, so keep patterns and test text reasonably sized regardless.

Enter a JavaScript regular expression, choose common flags, and test it against sample text. Matches and capture groups update after a short delay while execution stays isolated from the page.

What you can do

  • Supports global matching plus i, m, s, and u flags.
  • Lists match positions and capture groups.
  • Runs patterns in a Web Worker with a 1.5-second timeout.

Common uses

  • Debug validation or search patterns.
  • Check capture groups before using a regex in code.
  • Explore how flags change matching behavior.

Frequently asked questions

Which regex flavor does this use?

It uses the regular-expression engine provided by your browser JavaScript runtime.

Can a regex freeze the page?

Execution runs in a background worker. A pattern that exceeds 1.5 seconds is terminated, though you should still keep patterns and test text reasonably sized.

Related Tools