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.
Utility tools / Regex Playground
Explore patterns, inspect matches, and learn how regular expressions work.
Test real text, inspect captures, and preview what a replacement changes.
Launch day: 2026-10-02 Design review: 2026-10-09 Next release: 2026-11-15
2026-10-02Offsets 12–22 · UTF-16 code units
Three capture groups store year, month, and day. $3/$2/$1 rearranges them in the replacement.
\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.
(…) 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.
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.
Loading more tools…