Free Regex Tester & Debugger
Test a regular expression against your text with live match highlighting, capture groups, and a plain-English explanation.
No matches yet.
(start of a capturing group\d{4}any digit (0–9), exactly 4 times)end of the group-the character "-"(start of a capturing group\d{2}any digit (0–9), exactly 2 times)end of the group-the character "-"(start of a capturing group\d{2}any digit (0–9), exactly 2 times)end of the groupHow to use / FAQ
What regex flavor does this use?
It uses the JavaScript (ECMAScript) regular expression engine — the same one that runs in browsers and Node.js. Patterns behave exactly as they would in your JavaScript code, including flags like g, i, m, s, u, and y.
What do the flags mean?
g finds all matches instead of just the first, i ignores case, m makes ^ and $ match at line breaks, s lets the dot match newlines, u enables full Unicode handling, and y anchors matching to a sticky position. Toggle them with the buttons under the pattern.
How do capture groups and the replace preview work?
Parentheses create capture groups, shown beneath each match as $1, $2, and named groups. In the replace field you can reference them with $1, $2, or $<name> to rewrite matched text, and the result previews instantly.
Is my text sent anywhere?
No. The pattern runs against your text entirely in your browser — nothing is uploaded. Note that very complex patterns on large inputs can be slow, so input length and match count are capped to keep the page responsive.