Regex Tester
Type a regular expression and test text — matches are highlighted live, with capture groups listed below. Uses JavaScript regex syntax.
About this regex tester
This tester uses your browser's native JavaScript regular expression engine, so results exactly match what you'll get in Node.js and browser code. All matches are found (global matching is always on), highlighted inline, and listed with their positions and capture groups — including named groups like (?<year>\d{4}).
Quick reference
\d \w \s— digit, word character, whitespace (capitalized = negated)+ * ?— one or more, zero or more, optional; add?for lazy matching^ $— start / end of string (or line with themflag)(…)capture group,(?:…)non-capturing,(?<name>…)named(?=…) (?!…)— lookahead, negative lookahead
Frequently asked questions
Which regex flavor is this?
JavaScript (ECMAScript). It's very close to PCRE for everyday patterns; the main differences are around possessive quantifiers and some Unicode property syntax.
Why does my pattern match empty strings everywhere?
Patterns where everything is optional (like a*) legitimately match the empty string at every position. Anchor the pattern or require at least one character (a+) to avoid it.
Last updated: 2026-07-11