Regex Tester

Runs entirely in your browser — nothing you type is sent anywhere.

Try: · ·

A catastrophic pattern cannot freeze this tab

Regex matching backtracks: (a+)+$ against forty as retries exponentially, and a tester that runs it on the page thread simply freezes — there is no interrupting a running match. Here the match runs in a background worker raced against a two-second deadline; a runaway pattern is killed and comes back as a refusal that names catastrophic backtracking. Try the third example above and watch it happen.

This tests JavaScript, and says so

There is no such language as "regular expressions" — there are dialects. This page runs your browser's own ECMAScript engine, so a green result promises exactly that. Python's re, PCRE and grep diverge in ways that bite: possessive quantifiers and atomic groups do not exist here, \d is ASCII-only unless you opt into Unicode, and lookbehind arrived late to some engines. Your pattern's syntax errors surface with the engine's own message, verbatim. As with every tool here, the page is static and keeps working offline, verified by our automated tests on every release.