Regex Tester
Test regular expressions with live match highlighting, capture groups, replace mode, and a common patterns library. Includes a catastrophic-backtracking guard — patterns that freeze execution time out at 50ms. Runs entirely in your browser.
How the Regex Tester Works
All matching runs through the browser's native RegExp engine — no external library. The catastrophic-backtracking guard wraps exec() in a deadline check: if the loop hasn't completed within 50ms, it stops and shows a warning. Patterns like /(a+)+$/ applied to a long string of 'a's are classic examples that can freeze a browser — this guard catches them.
Replace mode uses String.prototype.replace(regex, replacement) and supports capture group references like $1, $2, named groups via $<name>, and the matched string itself as $&.