Why this regex tester is different
- It explains your pattern — every token, group and quantifier in plain English, nested the way the engine reads it.
- It can't freeze your browser — matching runs in a background worker and is stopped after 1.5 s, so catastrophic backtracking shows a clear warning instead of a hung tab.
- Code you can paste — JavaScript, Python (named groups converted to
(?P<name>)), PHP and Java strings with the escaping done for you. - Private — your pattern and text never leave the page. Share links keep everything in the URL fragment, which isn't sent to any server.
Regex cheat sheet
\ddigit ·\wletter/digit/_ ·\swhitespace ·.any character ·\bword boundary*0+ ·+1+ ·?optional ·{2,5}2 to 5 · add?to make it lazy:.*?[abc]one of ·[^abc]none of ·(…)group ·(?:…)non-capturing ·(?<name>…)named(?=…)followed by ·(?!…)not followed by ·(?<=…)preceded by ·\p{Script=Arabic}with theuflag
Frequently asked questions
Which regex flavor does this use?
Your browser's JavaScript engine (ECMAScript 2024), including named groups, lookbehind and Unicode properties. Most patterns work the same in Python, PHP (PCRE) and Java; the code export converts the syntax that differs.
Why does my pattern only find one match?
Without the g (global) flag JavaScript stops after the first match. Turn on g to see them all.
What is catastrophic backtracking?
Patterns like (a+)+$ can take exponential time on text that almost matches. Real servers have gone down because of it. Here the test is stopped after 1.5 seconds and you're told why — rewrite the nested quantifier to fix it.