Regex Tester
Test JavaScript regular expressions with live match highlighting, group inspection, and replace preview.
Preview — 3 matches
Also try admin@site.io
Match details (3)
$1, $2… for capture groups.Debug regex in real time
Every keystroke re-runs your pattern against the test string and highlights matches. Toggle flags (global, case-insensitive, multiline, dotall, unicode, sticky), inspect capture groups per match, and preview a bulk replacement — all locally in your browser using the native JavaScript RegExp engine.
How the Regex Tester Works
This tool lets you test regular expression (regex) patterns against sample text and see exactly where they match. Internally, a regex engine compiles your pattern into a finite state machine — a structure that reads the input text character by character and tracks whether the pattern's conditions are being satisfied at each step.
As you edit the pattern or the text, the tool immediately finds all matches and highlights them, while also displaying capture groups (the parts of the pattern in parentheses) and their captured values separately. It typically offers toggles for common flags — case-insensitive, global, multiline — which change how matching behaves across the text.
This is especially useful for developers validating form input (like email or phone number formats), searching for patterns in data, or testing find-and-replace logic before wiring it into actual code. Because regex patterns rarely work perfectly on the first try, being able to see matches update live saves significant debugging time — all without running any code.