Regex Tester

Write a regular expression, paste your test text and see every match highlighted live — with positions and capture groups.

Matches

Output will appear here.

Ctrl + Enter to run

Runs 100% in your browser — your data is never uploaded to our server.

Debug regular expressions faster

Regular expressions are powerful but easy to get subtly wrong. This tester runs your pattern with the browser’s JavaScript regex engine — the same one used by Node.js, Deno and every browser — and shows the results as you type: matches are highlighted in the text, and a table lists each match with its position and capture groups, including named groups such as (?<year>\d{4}).

Flags

FlagEffect
gglobal – find all matches instead of stopping at the first
iignore case
mmultiline – ^ and $ match at every line break
sdotAll – . also matches line breaks
uunicode – full Unicode support, enables \p{L} property escapes

Quick reference

TokenMatches
\d \w \sdigit, word character, whitespace (uppercase = the opposite)
.any character except a line break
[abc] [^abc] [a-z]character sets and ranges
* + ? {2,5}quantifiers; add ? to make them lazy
^ $ \bstart, end, word boundary
(…) (?:…) (?<name>…)capturing, non-capturing and named groups
a|balternation
(?=…) (?!…) (?<=…)lookahead, negative lookahead, lookbehind

Enter the pattern without the surrounding slashes. Backslashes are typed once (\d), not doubled as in a string literal.

Frequently asked questions

Which regex flavour does this use?

JavaScript (ECMAScript). Most syntax is shared with PCRE, Python and Java, but some features such as possessive quantifiers or atomic groups are not available in JavaScript.

Why does my pattern freeze or run slowly?

Nested quantifiers like (a+)+ can cause catastrophic backtracking. Make the pattern more specific. The tester stops after 5,000 matches to stay responsive.

How do I match a literal dot or bracket?

Escape it with a backslash: \. \( \[ .

Is my text uploaded?

No. Matching runs in your browser.