Regex to English Explainer
Paste a regular expression and get a plain-English, step-by-step explanation of anchors, classes, quantifiers, groups and lookarounds, plus a live test.
Paste a regular expression and get a plain-English, step-by-step reading of what it matches — anchors, character classes, quantifiers, groups, lookarounds and backreferences — indented the same way the pattern is nested. It reads JavaScript (ECMAScript) syntax, which shares most of its notation with PCRE, Python and Java, and you can try the pattern on a test string straight away.
How to use this tool
- Paste the pattern, either bare (\d+) or as a literal with slashes (/\d+/gi).
- Add flags if they are not already in the literal.
- Optionally type a test string to see what the pattern matches.
- Press Calculate. Read the explanation from top to bottom; indented lines belong to the group above them.
Formula
* = 0 or more · + = 1 or more · ? = 0 or 1 · {n} = exactly n · {n,} = n or more · {n,m} = n to m
A quantifier applies only to the item directly before it — one character, a class, an escape or a whole group. Adding ? after a quantifier (*?, +?) makes it lazy, so it takes as few characters as possible. Calculation runs in a worker with a two-second limit.
Example
The default date pattern reads as: the start of the string; capturing group 1 named "year" — a digit, exactly 4 times; the character "-"; capturing group 2 named "month" — either "0" followed by one character from [1 to 9], or "1" followed by one character from [0 to 2]; another "-"; group 3 named "day" — a digit, exactly 2 times; then the end of the string. It reports 3 capturing groups, and the test string 2026-10-29 gives 1 match.
Frequently asked questions
What does ?: mean in a regex?
It makes a non-capturing group: (?:abc) groups the pattern for alternation or a quantifier but does not store the match as a numbered group.
What is the difference between greedy and lazy?
A greedy quantifier such as .* takes as much text as it can and then backs off; a lazy one such as .*? takes as little as possible. On <b>x</b>, <.*> matches the whole string while <.*?> matches just <b>.
What does \b mean?
A word boundary: the position between a word character (letter, digit or underscore) and a non-word character or the start or end of the text. It matches no characters itself.
Why is my pattern reported as invalid?
It uses syntax JavaScript does not support, such as possessive quantifiers (a++) or atomic groups (?>…) from PCRE, or it has an unbalanced bracket. Python's (?P<name>…) groups are converted automatically.
Sources
Last updated: 2026-10-30