Regex & Patterns Runs in your browser

Regex Tester

Test JavaScript regular expressions against sample text with live match highlighting, capture groups and every flag — privately in your browser.

Live highlighting Capture groups All flags 100% local
/ /

Highlighted text

Matches

What Regex Tester does

Live highlighting

Every match is highlighted in your test text as you type the pattern.

Capture groups

See numbered and named groups for each match, with its position in the text.

Every flag

Toggle g, i, m, s, u and y and watch the result change.

100% local

Your pattern and test text never leave your browser.

Cheatsheet

The tokens you reach for most, at a glance.

\dany digit (0–9)
\wword char (a–z, 0–9, _)
\swhitespace
.any char except newline
^ $start / end of line
* + ?0+, 1+, 0 or 1
{n,m}between n and m times
[abc]one of a, b, c
[^abc]not a, b, or c
(…)capture group
(?<name>…)named capture group
a|ba or b
\bword boundary

Frequently asked questions

Which regex flavor is supported?

This tester uses your browser's native JavaScript (ECMAScript) regular expression engine, including named capture groups and all standard flags (g, i, m, s, u, y).

Does it show capture groups?

Yes. Every match lists its numbered groups and any named groups, along with the match position in the text.

Will it highlight all matches?

Yes — all matches are highlighted in the test text as you type, whether or not you enable the global flag.

Is anything sent to a server?

No. Your pattern and test text stay in your browser; the regex runs entirely client-side.

Last updated 2026-08-08