ToolVaults

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