Regex Explainer — Break Down a Pattern Token by Token
Paste any regular expression and get a token-by-token explanation: anchors, groups, quantifiers, character classes, and escapes. Complements our regex tester.
Runs 100% in your browser — nothing is uploaded.
//
Breakdown
^Start of string (or line with `m` flag)anchor(\w+)Capturing groupgroup@Literal "@"literal(\w+\.\w+)Capturing groupgroup$End of string (or line with `m` flag)anchor
Frequently asked
What syntax is understood?
JavaScript / ECMAScript regex. That covers common escapes (\d, \w, \s), all group types (capturing, non-capturing, named, lookaheads, lookbehinds), quantifiers, and character classes.
Why is this different from the Regex Tester?
The tester shows what the pattern matches against your input. The explainer shows what the pattern itself means — useful for reading unfamiliar regex from someone else's codebase.
Does it detect invalid patterns?
Yes — the pattern is compiled with new RegExp() first, and any syntax error is surfaced before tokenization runs.
Related tools
- Regex TesterTest JavaScript regular expressions against any string with live match highlight
- JSON FormatterFormat, validate, and minify JSON in your browser. See parse errors with line/co
- Text DiffCompare two blocks of text line by line and see exactly what changed. Runs entir
- .env File ParserParse a .env file and see it as a JSON object. Handles comments, quoted values,
- Base ConverterConvert numbers between binary, octal, decimal, and hexadecimal. Supports huge n
- Credit Card ValidatorValidate credit card numbers with the Luhn algorithm and detect the brand: Visa,