RootUtils

Regex Tester

Client-Side Secure

Free online Regex Tester & Replace tool (JavaScript RegExp). Test patterns, highlight matches, inspect capture groups, and preview replacements instantly — runs 100% client-side.

Regex Studio

Test JavaScript regular expressions with matches, groups, and replace preview.

//
Test String
3 Matches
Highlight PreviewShowing up to 300 highlights
John Doe
Jane Smith
Bob Johnson

Match Explorer

Matches
Flags: gm • Groups (est.): 2
Match #1
idx 08 • len 8
John Doe
Group 1
John
Group 2
Doe
Match #2
idx 919 • len 10
Jane Smith
Group 1
Jane
Group 2
Smith
Match #3
idx 2031 • len 11
Bob Johnson
Group 1
Bob
Group 2
Johnson

Presets

Quick Reference

Click an item to insert it into your pattern.

Character Classes

Quantifiers

Anchors & Groups

Engine Notes
  • This tool uses the JavaScript RegExp engine (new RegExp(pattern, flags)).
  • If your runtime doesn’t support a flag (like d in older engines), it won’t appear in the flag toggles.
  • To keep the UI fast, match lists are capped at 2000.

Is this tool broken?

Let us know if you found a bug or have a feature request.

Regex Tester & Replace Tool (JavaScript RegExp)

This Regex Tester is a fast, client-side workspace for JavaScript regular expressions. Paste a pattern and test string to instantly see matches, capture groups, indexes, and replacement output. Everything runs in your browser using RegExp — your input is not sent to a server.

Privacy note: Matching and replacement happen locally. If you paste logs, emails, or API keys, they stay on your device.

Live Matching

As you type, matches update immediately using the browser’s native regex engine. Great for quickly iterating on patterns.

Groups & Named Groups

Inspect capture groups and (when used) named groups. Export results as JSON for debugging or sharing in tickets.

Replace Preview

Preview replacements using JS replacement tokens like $1, $&, and named groups ($<name> when supported by your engine).

How to Use This Regex Studio

  • 1) Enter a pattern in the /pattern/ input.
  • 2) Toggle flags (g/i/m/s/u/y) to control matching behavior.
  • 3) Paste your test text (or drag & drop a text file).
  • 4) Switch to Replace to preview output using a replacement string like $2, $1.
  • 5) Share your current setup using the Share Link button (small inputs are stored in the URL hash).

Note: This tool uses the JavaScript regex engine. Features differ from PCRE/Python (for example, lookbehind support depends on your JS runtime).

Common FAQ

Does this send my text to a server?

No. Matching happens in your browser using JavaScript’s RegExp.

Why do I see fewer matches than expected?

You likely have the g flag off (non-global). Without g, JavaScript returns only the first match.

Why is there a “match limit”?

Very large inputs or patterns can produce thousands of matches. This tool caps the match list to keep your UI responsive. The status bar will tell you if the limit was reached.