Regex Tester

/gi
g
i
m
s



What is a regex tester?

A regular expression (regex) is a pattern for finding and extracting text — emails, phone numbers, dates, codes and more. This tester lets you write a pattern, toggle flags, and instantly see every match highlighted in your text, along with any capture groups. It uses your browser’s own JavaScript regex engine, so everything stays on your device.

Quick reference

d digit
w word char
s whitespace
. any char
^ $ start / end
b word boundary
* + ? repeat
{2,5} 2 to 5
[abc] a, b or c
(…) capture group
a|b a or b
. literal dot

Frequently Asked Questions

What do the flags g, i, m, s mean?

g finds all matches (not just the first), i ignores case, m makes ^ and $ match at line breaks, and s lets . match newlines too.

Which regex flavour is this?

JavaScript (ECMAScript) regex — the same engine used in Node.js and every browser. Most patterns are portable to other languages, but some advanced syntax differs.

Is my text sent anywhere?

No. Matching runs entirely in your browser — your pattern and text are never uploaded, logged or stored.

Why is my pattern showing an error?

The pattern isn’t valid JavaScript regex — often an unescaped special character (like a lone ( or [) or a bad quantifier. The error message shows what the engine didn’t like.