Regex Token-by-Token Explainer

Found a regex you don't understand? Paste it and get a token-by-token plain-English explanation — no more squinting at \d{2,4}[a-z]?.

—
Embed this tool on your website / blog No code required · Copy and paste
HTML Embed Code (iframe):
<iframe src="https://lucentool.com/regex-explainer" width="100%" height="650" style="border:1px solid #e5e0d8;border-radius:12px;max-width:850px;width:100%;" frameborder="0"></iframe>
<div style="font-size:12px;color:#78716c;margin-top:6px;font-family:sans-serif;">Powered by <a href="https://lucentool.com/regex-explainer" target="_blank" style="color:#c85a32;text-decoration:none;">Lucentool - Regex Token-by-Token Explainer</a></div>

Reading a regex

A regex is a sequence of tokens, each with a job: literal characters match themselves, character classes ([a-z]) match one of a set, quantifiers (+ * ? {2,4}) say how many, anchors (^ $ \b) pin positions, and groups ((…)) bundle and capture. The explainer walks every token left to right and says what the engine will try to match at that spot.

Common patterns decoded

Tips