Regex Cheatsheet
browse a complete regex syntax reference with live examples
By Bikram NathLast updated
A searchable reference for every regex syntax element: metacharacters, quantifiers, groups, and assertions, all with live examples you can filter instantly. Useful when you half-remember whether \b matches inside a word or at its edge — type 'boundary' and the answer surfaces immediately. Unlike regex101, this is a reference not a tester, so the focus is on syntax lookup rather than match debugging.
Interactive Regex Cheatsheet — coming soon
We're still building the interactive Regex Cheatsheet. The guide below explains exactly what it does and how to use it. In the meantime, here are DevLab tools that already work in your browser:
Browse all working tools →What is Regex Cheatsheet?
Regex Cheatsheet is a filterable syntax reference covering the full range of regular expression constructs: literals, metacharacters like \d and \s, quantifiers like {n,m} and ?, anchors like ^ and $, capturing and non-capturing groups, named captures, lookaheads, lookbehinds, and Unicode property escapes. Each entry includes a short example showing input and what it matches, so you can verify your mental model without switching tools. Typing 'lazy' immediately narrows the list to \*? and +? with examples showing how they differ from greedy variants.
Developers typically reach for this when they remember a pattern works but can't recall the exact syntax, or when learning an unfamiliar construct like possessive quantifiers or atomic groups. It fills a different role than regex101 or regexr, both of which center on testing a specific pattern against input text. Those tools are better for iterating on a regex you're actively writing; this one is better for the 'what's the syntax for named backreferences again?' moment.
One thing that trips people up: the cheatsheet reflects ECMAScript regex syntax by default, which supports named captures (?<name>...) and lookbehinds only from ES2018 onward. If you're writing patterns for a non-JS engine like PCRE or Python's re module, some syntax will differ. PCRE supports possessive quantifiers (\d++) and atomic groups ((?>...)) which ECMAScript does not, so a pattern that looks valid here may fail or behave differently in PHP or Perl.
When to use Regex Cheatsheet
Expert Notes
Most developers memorize about 20% of regex syntax and look up the rest. The cheatsheet exists for that 80%. The biggest practical gap I see is around Unicode-aware patterns — developers write \w expecting it to match accented characters (it doesn't in ECMAScript; \w is ASCII-only), then get bug reports from users with names like José or Müller. The Unicode property escapes (\p{Letter}, \p{Script=Greek}) solve this cleanly but are still underused because they feel unfamiliar. If you're building anything that touches user-generated text from a multilingual audience, learn \p{} syntax before you need it in a production incident.
DevLab's Take
This is the page I keep open in a pinned tab during code review. It's faster than regex101 when you just need to confirm syntax — you're not building a pattern, you're verifying one. The filter narrows 100+ entries to the one you need in under a second. The main limitation is that it's ECMAScript-focused, so if you're switching between Python and JavaScript regex (which happens constantly in data engineering), you'll still need to double-check engine-specific differences like named group syntax and flag behavior.