Break a regular expression into its parts, each with a plain explanation, nesting depth, and a note where another engine behaves differently.
Written as you would write it between slashes. Nothing is compiled or run.
Waiting for a pattern
The pattern is read as text, not compiled — so a pattern that will not compile can still be explained.
Paste a pattern
Every construct is listed in order, indented by how deeply it nests, with what it does and where it behaves differently in another engine.
A pattern is checked for the two shapes that cause nearly all regular expression outages.
Constructs that differ between engines are called out next to the construct that causes them.
Regex Explainer runs entirely on your device — the pattern is read as text and is never compiled or executed.
You’re on the Free plan. Compare plans
The pattern is read as text and never compiled. That is a deliberate difference from a tester: the main reason to want a pattern explained is that it does not work, and a tool that refuses to explain anything that will not compile is useless exactly when you need it. A broken pattern is explained as far as it goes, and the part that breaks is named.
Each construct is indented by how deeply it nests, so a group's contents read as being inside it rather than after it. That is the single thing that makes a long pattern readable, and it is what a flat list of tokens cannot give you.
Where a construct behaves differently in another engine, the note is attached to that construct rather than collected in a footnote. `\\d` is ASCII-only here and Unicode-aware in .NET; `$` matches before a trailing newline in Python and not here; lookbehind does not exist in Go's RE2 at all. Those differences are the reason a pattern that worked in one language fails in another, and they are worth seeing next to the thing that causes them.
The backtracking summary is the same analysis the dedicated checker runs. A pattern shaped like one that hangs is flagged here too, because you are most likely to be reading a pattern closely at exactly the moment that matters.
No. The pattern is read as text, character by character, and is never compiled or executed. That is why a pattern with a syntax error still produces an explanation, and why explaining a dangerous pattern here cannot hang the page.
Because that is the usual reason to want it explained. The explanation runs as far as the pattern makes sense and names the construct that breaks — a trailing backslash, an unterminated class, an atomic group JavaScript does not have.
JavaScript's, because that is what runs in your browser and what the tester next door uses. Where a construct differs in PCRE, Python, Java, .NET or Go, the difference is noted on that construct.
Only real capturing groups — `(…)` and `(?<name>…)`. Non-capturing groups and all four kinds of lookaround are listed as constructs but do not count, which matches what the engine reports.