Tools

Regex Tester

/ /g

Test string

Replace

Enable replace preview

About Regex Tester

Type a JavaScript regular expression and a test string to see every match highlighted live, with each capture group broken out, plus an optional replace preview using $1, $2, $&-style replacement patterns. Everything runs with the browser's native RegExp engine on your device — nothing is uploaded anywhere.

Frequently asked questions

Which regex flavor does this use?

JavaScript's native RegExp engine (ECMAScript), the same one your browser and Node.js use. Flags: g, i, m, s, u.

How do I see capture groups?

Each match in the list below the highlighted text shows its full match plus any numbered capture groups it contains.

How does replace work?

Turn on "Enable replace preview" and type a replacement pattern — $& for the whole match, $1/$2 for capture groups — to see the resulting text live.

Does anything get sent to a server?

No. Matching happens entirely in your browser using the built-in regex engine.

Feedback Support