Regex Cheat Sheet
Quick reference for the regex syntax people forget most often.
Advertisement
About this tool
A quick-reference table of the regular-expression syntax supported by JavaScript's own regex engine — the same one used by every regex tool on this site. Character classes, anchors, quantifiers (including the lazy forms), groups and backreferences, lookarounds, escapes and flags are grouped together with a one-line explanation beside each, so you can look one up without leaving the page or reaching for an external cheat sheet.
- Does this cover every flavour of regex?
- No — it covers JavaScript's own syntax (used in the Regex Tester and Regex Find & Replace tools on this site). Python, PCRE and .NET regex differ in some details, particularly around lookbehind support and named groups.
- Can I test a pattern from here?
- This page is reference only. Use the Regex Tester to try a pattern against real text.