Developer ToolRegexPlaygroundOfflineDeep Prototype

Regex Lab — Interactive Playground

Live regex editor with capture-group highlighting, English-language explainer of every token, a library of 18 hardened patterns (UUID v4, JWT, IPv4, AWS access keys, semver), and a replace mode.

Regex Lab — Interactive Playground preview
Open live →

What it is

A regex playground built for the moment you’re staring at a pattern someone wrote three years ago and need to know what it does. Paste the pattern, paste some text, see matches highlighted in-place, capture groups numbered, and every token explained in plain English in a side panel.

What’s in it

  • Live highlighting — matches appear as you type, capture groups colored individually
  • Explainer — tokenizes the regex and renders each token’s meaning: \b = “word boundary”, (?<=…) = “positive lookbehind”, {2,5} = “repeat between 2 and 5 times”, *? = “zero or more, lazy”
  • Match list — every match with its position, length, and per-group breakdown
  • Replace mode — apply the pattern with $1, $2 references and see output update live
  • Pattern library — 18 hardened named patterns including:
    • Email (loose + RFC-ish)
    • IPv4 (with octet range constraint)
    • UUID v4 (with version + variant bits)
    • JWT token
    • AWS access key (AKIA…)
    • GitHub PAT (ghp_…)
    • OpenAI key (sk-…)
    • Semver, ISO 8601, ISBN-10/13, hex color, slug, Markdown link, HTML tag, US phone, credit card

Why this one matters

Regex is one of the few skills where reading and writing diverge sharply. Most engineers can write a regex from a clean spec. Most cannot read a regex written by someone else in under two minutes. The explainer panel is the small intervention that closes that gap — tokens get named, lookahead vs lookbehind vs non-capturing get distinguished, lazy vs greedy gets surfaced.

Pattern library exists for a different reason: the AWS-key / OpenAI-key / JWT patterns are exactly what a secret-leak scanner uses. Having them ready to grep against a pasted log or commit message means a 30-second audit is one keystroke away.

How it ships

Single HTML file, ~21KB. Zero dependencies. The tokenizer/explainer is 130 lines of vanilla JavaScript. Eval is ~0.2ms on a 350-character test input — fast enough to update on every keystroke without debouncing.

Open the tool →