Regex Tester
Test regular expressions and highlight matches in real time.
Test regex search and replace in real time with match highlights and capture group details.
Regex Replace Tester lets you interactively build and test regular expression search-and-replace operations in real time.
It highlights matches in the source text, shows each match’s index, length, and capture groups in detail, and displays the final replaced string — all at once as you type. The built-in quick reference for patterns and replacement tokens makes it useful for both debugging and learning regex.
g (global — find all matches), i (case-insensitive), m (multiline — ^ and $ match line boundaries), and s (dotAll — . matches newlines).
Use $1, $2, … for numbered groups, $<name> for named groups. $& inserts the entire match, $` inserts the text before the match, and $' inserts the text after the match.
Yes. Zero-width matches like ^ and lookaheads are handled safely to prevent infinite loops during global replacement.
No. All processing uses the JavaScript regex engine running entirely in your browser.