Regex Tester
Test regular expressions and highlight matches in real time.
Break down a regex pattern into color-coded tokens with plain-language explanations for each part.
Regex Explain breaks a regular expression down into its individual tokens, color-codes each one by type, and provides a plain-language description of what each part does.
Hover over any token in the colorized view to highlight its corresponding explanation. Built-in examples for email, date, URL, IPv4, and hex color patterns let you explore real-world regular expressions instantly.
Anchors (^ $ \b \B), quantifiers (* + ? {n,m} and their lazy variants), capture groups (named, non-capturing, lookahead, lookbehind), character classes ([...]), escape sequences (\d \w \s etc.), the dot metacharacter, alternation (|), and literal characters.
Quantifiers followed by ? are described as lazy (shortest match), while those without ? are described as greedy (longest match).
Yes. The tokenizer processes the pattern left-to-right, so nested groups are each tokenized and explained individually. Structural validity is checked by the JavaScript RegExp engine.
No. All processing happens entirely in your browser.