Utility tools / Regex Playground

Find the pattern. See why it matches.

Explore patterns, inspect matches, and learn how regular expressions work.

01 / Pattern explorerJavaScript RegExp

Turn a pattern into an explanation.

Test real text, inspect captures, and preview what a replacement changes.

Enter the pattern without / delimiters. Example: \bword\b
Flags
73 / 100,000 characters
$1 = capture 1 · $<name> = named capture · $& = whole match · $$ = literal $
Match preview3 matches
Launch day: 2026-10-02
Design review: 2026-10-09
Next release: 2026-11-15
0 empty matchesBuilt-in exampleAll matches

Inspect a match

Whole match2026-10-02

Offsets 12–22 · UTF-16 code units

Capture groups
$1
2026
$2
10
$3
02
Read the pattern guide

Three capture groups store year, month, and day. $3/$2/$1 rearranges them in the replacement.

Characters & boundaries

\d digit · \w word character · \s whitespace. [abc] chooses one character; [^abc] excludes it.

^ anchors the start, $ the end, and \b a word boundary. Use \\ to match a literal backslash.

Groups & repetition

(…) captures text; (?:…) groups without capturing. (?<name>…) names a capture; (?=…) is a zero-width lookahead.

* means zero or more; + one or more; ? optional; {2,4} a count range. Quantifiers are greedy; append ? to make them lazy.

Selected flags

g Global: find all matches. Without g, the result contains only the first match.

Zero-width matches can legitimately return empty text. Unicode mode advances over an entire code point after them.

More from Labs

Utility catalogue

Loading more tools…