~/regex-tester apps ← terminal
🔒 100% client-side · Your data never leaves this browser · No upload · No server
 ██████╗ ███████╗ ██████╗ ███████╗██╗  ██╗
 ██╔══██╗██╔════╝██╔════╝ ██╔════╝╚██╗██╔╝
 ██████╔╝█████╗  ██║  ███╗█████╗   ╚███╔╝
 ██╔══██╗██╔══╝  ██║   ██║██╔══╝   ██╔██╗
 ██║  ██║███████╗╚██████╔╝███████╗██╔╝ ██╗
 ╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚══════╝╚═╝  ╚═╝
Write a regex · See matches highlighted live · Explore capture groups & replacements
0
Matches
0
Groups
0
Chars matched
0ms
Exec time
⚙ Pattern
/ /
flags
📄 Test String
🎨 Match Output
Type a pattern and test string to see live matches
.any character
\ddigit [0-9]
\Dnon-digit
\wword char [a-zA-Z0-9_]
\Wnon-word char
\swhitespace
\Snon-whitespace
\bword boundary
^start of string/line
$end of string/line
*0 or more
+1 or more
?0 or 1
{n}exactly n
{n,m}between n and m
()capture group
(?:)non-capture group
(?=)positive lookahead
(?!)negative lookahead
(?<=)positive lookbehind
(?<!)negative lookbehind
[abc]char class
[^abc]negated char class
|alternation (or)
FAQ — Regex Tester

Regex Tester — frequently asked questions

What does this regex tester do?

It lets you write a regular expression and instantly see all matches highlighted in your test string. You get live stats, capture group details, index positions, and can also test replacements.

Is my data uploaded anywhere?

No, never. The entire tool runs in JavaScript inside your browser. No data is sent to any server. You can verify this in your browser's network tab.

Which regex flavour is used?

JavaScript (ECMAScript) regular expressions. This is the same engine used in modern browsers, Node.js, Deno, and Bun. Named groups, lookbehinds, and Unicode property escapes are supported.

Can I use flags like global or case-insensitive?

Yes. Toggle the g (global), i (case-insensitive), m (multiline), s (dotAll), and u (unicode) flags with the buttons above the pattern input. The regex is re-evaluated instantly.

How do capture groups work?

Wrap part of your pattern in parentheses () to create a capture group. The match details table below the output shows each group's value and index. Groups are colour-coded in the output.

Can I test replacements?

Yes. Type a replacement string in the replacement input below the pattern. Use $1, $2 etc. to reference capture groups, or $& for the full match. The replaced output appears live.

Can I share my regex?

Click the Share link button to copy a URL that encodes your pattern, flags, and test string. Anyone who opens the link will see the same setup.