How to use the Regex Explainer
- Paste a regex (with or without /slashes/ and flags).
- Read the explanation for each token.
- Try the examples to learn common patterns.
What does this tool do?
Regular expressions are compact but cryptic. The explainer splits a pattern into tokens — anchors, character classes, groups, quantifiers and escapes — and describes what each one matches, indenting the contents of groups.
It also checks the pattern with your browser's regex engine and reports syntax errors. Test it against real text with the Regex Tester.
Why use it?
- Plain-English breakdown.
- Groups shown as nesting.
- Syntax check included.
Privacy
The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.