Regex Cheatsheet & Reference
A clean searchable regex cheatsheet. Examples, flags, common patterns, and a live tester.
A clean searchable regex cheatsheet covering metacharacters, quantifiers, groups, anchors, lookarounds, character classes, and flags. Common-patterns library with copy-ready regex for emails, URLs, phones, IPs, dates, slugs, hex colors, and credit cards. Embedded mini-tester at the top.
When to use it
- 1Refreshing your memory on a specific regex syntax element.
- 2Copy-pasting a known good regex for a common pattern.
- 3Testing a quick pattern without leaving the cheatsheet.
How it works
- 1
Search the reference
Top search filters the cheatsheet sections live. Click any element for an explanation and a copyable example.
- 2
Browse common patterns
Grid of named patterns - email, URL, phone, IP, date, slug, hex color, credit card - each with regex, explanation, and example matches.
- 3
Test inline
Mini-tester at the top: paste a pattern and a string, see matches highlighted.
Frequently asked
Which regex flavor?
JavaScript / ECMAScript. The patterns mostly translate to other engines with minor adjustments.
Want a tool just like this, but yours?
Every tool on this page was generated by GenMB from a single prompt. Describe yours and ship it to your own subdomain in minutes.
Build with GenMBRelated tools
AI Color Palette Generator
Generate beautiful color palettes by random, harmony, or AI prompt. Save your library, export as CSS or Tailwind.
CSS Box Shadow Generator
Design CSS box-shadows visually with multiple layers. Save your library and copy production-ready CSS.
CSS Clamp() Calculator
Build fluid responsive typography and spacing with clamp(). Min, max, and viewport ranges, copy CSS.
Responsive Viewport Tester
Test how a site looks at different viewport sizes. Save device presets when signed in.