Test regular expressions live with highlighted matches, capture groups, and a plain-English breakdown of every token. Includes replace preview and flag toggles.
A regular expression that almost works is worse than one that plainly fails, because you ship it. The Regex Tester highlights every match inside your sample text as you type, breaks the pattern into labelled tokens, and lists each capture group by name and by number, so “it matched” becomes “it matched this, here, with these groups”.
All 6 JavaScript flags are individual toggles with a plain-English hint on each: g for every match, i for case, m to make anchors line-aware, s to let the dot cross newlines, u for Unicode code points, and y for sticky matching from the last index.
A replace panel sits below the matches, so you can check a substitution before running it anywhere destructive. Named groups work in the replacement string, which is what makes reordering a date a one-line operation. Everything runs against text in the page.
The tool opens on the pattern (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})with a replacement of $<day>/$<month>/$<year>. Against a line listing three ISO dates it finds 3 matches, each with 3 named groups, and the replace preview rewrites every one into day-first order. Six more sample patterns are a click away, covering email addresses, URLs, hex colours, IPv4 addresses and the doubled-word check \b(\w+)\s+\1\b, which is the shortest useful demonstration of a backreference there is.
Stopped after 2,000 matches — narrow the pattern to see the rest. The count is still accurate up to that point.a* from hanging the page.Click to append a token:
Load sample pattern:
Matches
3
Unique
3
Groups
6
Chars Tested
60
2026-07-31index 9–192026-08-14index 29–392027-01-02index 49–59(?<year>Named capture group 1 — stored as "year"\dAny digit (0–9){4}Repeat exactly 4 times)End of the group-Match the literal text "-"(?<month>Named capture group 2 — stored as "month"\dAny digit (0–9){2}Repeat exactly 2 times)End of the group-Match the literal text "-"(?<day>Named capture group 3 — stored as "day"\dAny digit (0–9){2}Repeat exactly 2 times)End of the group