Regex Tester

Write a regular expression, paste any test string, and see matches highlighted in real time. Runs entirely in your browser — nothing uploaded.

Flags

Pattern: //g

Common patterns

.
Any character except newline
\d
Digit (0–9)
\w
Word character (a–z, A–Z, 0–9, _)
\s
Whitespace
\D \W \S
Negations of the above
^
Start of string/line
$
End of string/line
*
0 or more
+
1 or more
?
0 or 1 (optional)
{n}
Exactly n times
{n,m}
Between n and m times
[abc]
Character class
[^abc]
Negated character class
(abc)
Capture group
(?:abc)
Non-capturing group
(?<name>abc)
Named capture group
a|b
a or b
\b
Word boundary
Frequently asked questions

What regex flavor does this tester use?

It uses JavaScript (ECMAScript) regular expressions — the same engine your browser runs — so syntax like named groups <name>, lookaheads, and the g, i, m, and s flags behaves exactly as it would in JS code.

Do I need to wrap my pattern in slashes?

No. Type the pattern itself (for example \d{3}-\d{4}) and toggle the flag chips below it; the tool builds the /pattern/flags form for you and shows a live preview.

Does it show capture groups?

Yes. Matches are highlighted in the test string and the match details panel lists each match along with its numbered and named capture groups.

Is my test data uploaded anywhere?

No. The pattern and test string are evaluated entirely in your browser — nothing is sent to a server.

Related tools