Regex explainer
Paste any regex pattern. Get a token-by-token breakdown, a list of strings it matches and doesn't, the common pitfalls, and performance notes for your chosen flavor.
Regular expressions are tiny programs that match patterns in text. They're notoriously cryptic — most engineers can write them but few can read them confidently a week later. The Regex Explainer breaks any pattern into its constituent tokens (anchors, character classes, quantifiers, groups, lookarounds, backreferences) and shows what each one does with concrete examples.
Flavor matters: (?P<name>...) is Python-only, [[:alpha:]] is POSIX, \K resets the match in PCRE. Pick your flavor and the explainer accounts for it.
Frequently asked
What's catastrophic backtracking?
A pathological case where nested quantifiers (like `(a+)+`) cause the regex engine to try exponentially many paths. The explainer flags risky patterns.
Can you handle complex lookarounds?
Yes — lookahead, lookbehind, negative variants, and atomic groups are all decomposed (where the flavor supports them).
Will you test my pattern against my input?
Use a regex tester like regex101 for live testing. This tool focuses on understanding the pattern itself.