inspect

Regex Explain

Translate a regular expression into plain English. Walks the AST and emits a per-part breakdown — what each char-class, group, quantifier, assertion, and alternation actually means. Recognises ~30 common patterns by shape (emails, URLs, UUIDs, etc.). Chains after regex-tester and regex-visualize for the "what does this thing actually do?" hand-off.

Loading…

About Regex Explain

Paste a regex — with or without `/.../flags` delimiters — and get a plain-English breakdown of what every part does. The tool parses the regex into its AST and walks each node: character classes, groups, quantifiers, assertions, alternation, backreferences, every flag. Recognises ~30 common patterns by shape and tells you when your regex is "an email matcher" or "a UUID pattern". Helpful for code review, learning, or auditing a regex from someone else.

Category
inspect
Input
Accepts: text/plain.
Output
Outputs: application/json.
Cost
Free, runs in your browser
Memory
low
Privacy: Regex Explain runs entirely on your device. Files you provide never leave your browser — no uploads, no server, no tracking. The page works offline once loaded.

Common uses

  • Decode an unfamiliar regex pulled from a Stack Overflow answer.
  • Verify a regex you wrote does what you think it does — read the English, not the symbols.
  • Teach regex by example — paste any pattern, see the structure.
  • Audit production regexes for accidental behaviour (greedy quantifiers, missing anchors, unintended backtracking).
  • Compose into chains: tester → visualize → explain — three views of the same regex.

Frequently asked questions

Does it accept patterns from other languages (Python, PCRE, .NET)?

The parser targets JavaScript regex syntax. Most patterns work as-is, but a few constructs vary: PCRE-only features like `\K` and atomic groups are unrecognised, .NET-style balanced groups are not supported. For mainstream patterns (anchors, char classes, quantifiers, captures, alternation, lookarounds) the breakdown is correct across flavours.

What does "Recognised pattern" mean?

The tool keeps a curated table of common patterns (emails, URLs, UUIDs, IPv4/6, ISO dates, hex colors, etc.). When your input matches one of these exactly, the summary names it ("Recognised pattern: Email addresses.") so you don't have to puzzle through the breakdown to know what it does.

Does it explain flags?

Yes — the summary lists active flags and what they do: `g` (global), `i` (case-insensitive), `m` (multiline), `s` (dotall), `u` (unicode), `y` (sticky).

Keywords

  • regex
  • regexp
  • explain
  • breakdown
  • annotate
  • pattern
  • translate

Try next