Regex Tester

Test JavaScript-style regular expressions against sample text, inspect matches and capture groups, and preview replacements directly in your browser. Your pattern and test text never leave the page or touch server memory.

Matches 0
Capture groups 0
Matched characters 0
Active flags g

Match preview

Enter a pattern and test text, then run the regex.

Matches and capture groups

Each match shows its text, character range, and any captured groups.

What this tool does

It tests JavaScript-style regular expressions and shows matches, capture groups, flags, and replacement results.

Why it is private

The pattern and test text stay inside your browser, so nothing is uploaded or stored in server memory.

What it is useful for

  • Checking whether a pattern matches the text you expect.
  • Debugging capture groups before using a regex in code.
  • Previewing replacements with tokens like $1 and $&.

Important note

This follows the browser's JavaScript regex engine, so results match what you would usually get from RegExp in modern JavaScript.