What Is Regex to Plain English?
Regular expressions are powerful pattern-matching tools used in every programming language, but their syntax is notoriously difficult to read. A pattern like ^(?=.*[A-Z])(?=.*\d)[A-Za-z\d@$!%*?&]{8,}$ is meaningful to a regex engine but opaque to most humans — even experienced developers.
This tool translates a regular expression into a plain English explanation, token by token: anchors, quantifiers, character classes, escapes, flags, numbered and named groups, lookarounds, backreferences and Unicode property escapes, with nested parts shown indented under the part that contains them. It is invaluable for understanding inherited code, debugging patterns, learning regex syntax, and documenting expressions for teammates who may not be regex-fluent.
How to Use This Tool
- Paste your regex — Enter any regular expression. The tool accepts patterns with or without delimiters and flags (like /pattern/gi).
- Read the breakdown — Each component of the regex is explained individually — what it matches, whether it is required or optional, and how it interacts with surrounding elements.
- Understand the full pattern — A summary under the breakdown describes what the entire expression matches in one paragraph and says how many capture groups it has.
- Copy the explanation — Use the plain English description in code comments, documentation, or pull request descriptions to help teammates understand complex patterns.
Worked example: the same patterns, before and after
The explainer now builds a syntax tree with regjsparser 0.13.3, the parser behind Babel's regex transforms, instead of reading the pattern left to right one character at a time. Each group, lookaround and repeat is shown with the parts inside it indented beneath. On October 13, 2026 we ran the previous and the new explainer on the same patterns in Chromium 141:
| Pattern | Before (v206) | Now |
|---|---|---|
(\w)\1 | "\1" read as the literal text "1" | "The same text that group 1 captured": a repeated character such as "ee" |
\p{L}+ with u | "p" then "exactly L times" | "Any letter", repeated one or more times |
\p{L} without u | "p" then "exactly L times" | the four characters "p{L}", with a note that \p needs the u flag |
(?<year>\d{4}) | "Capturing group: ?<year>\d{4}" | "Capture group 1 named year", then its inside: a digit, exactly 4 times |
(?<=\$)\d+ | lookbehind listed as something that is matched | "Lookbehind: the text before this point must match; nothing is consumed" |
(a(b(c)))\3 | groups shown as one block, \3 as the text "3" | three numbered, nested groups; \3 points at group 3 ("c") |
cat|dog| | one flat list with "OR" in the middle | "Either of 3 alternatives", each listed, the third being the empty string |
[\p{L}--[a-z]] with v | "Any character in: \p{L}--[a-z" | "A character that is any letter except one of [a-z]" |
(?i:abc)d | group text only | "Non-capturing group with flag i turned on inside" |
(a|b | "Capturing group: a|b" (an invalid pattern explained as valid) | "Not a valid JavaScript regex" with the browser's own error |
To check the parser against the engine that actually runs your regex, we collected every regex literal in this site's own JavaScript (1885 distinct patterns from 850 files) and explained each one. All 1885 were explained without an error, and for all 1885 the number of capture groups the explainer reports equals the number V8 (the engine in Chrome and Node) creates, counted by running each pattern. 20 of them use backreferences and 71 use lookarounds. In the browser, 12 of 12 targeted cases gave the expected wording.
- It explains JavaScript regex, the flavour your browser runs. That includes named groups,
\p{…}property escapes with the u flag, set operations with the v flag and inline flag groups like(?i:…)(in Chrome and Edge since 125, Firefox since 132 and Safari since 26). Patterns are first checked by your browser's own RegExp, so an invalid pattern is reported, not explained. - It describes, it does not judge. The breakdown says what each part matches; it does not warn about greedy repeats or slow patterns. For catastrophic backtracking use the Regex Complexity Scorer, and to see real matches use the Regex Tester.
- PCRE-only syntax is not supported. Possessive quantifiers (
a++), atomic groups and(?i)without a colon are errors in JavaScript, so the tool reports them as invalid.
Why a plain-English breakdown helps
Regex is hard to read even for people who write it. In a study of 180 participants and 42 pairs of equivalent regexes, Chapman, Wang and Stolee (ASE 2017) found that some ways of writing the same pattern were understood more reliably than others, for example a range like [0-9] over a class like \d. Michael and colleagues surveyed 279 professional developers and interviewed 17 (ASE 2019): regexes were reported as hard to read, search for, validate and document, and most participants did not know the denial-of-service risks. In a 22-person controlled trial, Hollmann and Hanenberg (VISSOFT 2017) measured that answering questions from the usual textual notation took almost three times as long as from a graphical one, which is the reason this tool lays the pattern out as an indented tree rather than one line.
Sources
Checked on .
- regjsparser 0.13.3 (BSD-2-Clause)
- ECMAScript 2025 Language Specification, §22.2 RegExp objects
- MDN: Regular expressions cheat sheet
- MDN: Lookbehind assertion
- MDN: Modifier (?ims-ims:...) and browser compatibility
- MDN: RegExp.prototype.unicodeSets (v flag)
- Chapman, Wang, Stolee: Exploring regular expression comprehension (ASE 2017)
- Michael et al.: Regexes are Hard (ASE 2019)
- Hollmann, Hanenberg: Readability of regular expressions, textual versus graphical (VISSOFT 2017)
Related tools
- Once you understand what a pattern matches, you should also know how it performs — the Regex Complexity Scorer flags nested quantifiers, alternation inside repeats, and other ReDoS smells.
Frequently Asked Questions
📖 Learn More
Related Article Regular Expressions: Complete Beginner's Guide → Related Article How to Test Regular Expressions Online →Built by Derek Giordano · Part of Ultimate Design Tools