Regex Cheatsheet
A searchable quick reference for regex syntax.
Basics
.Any character except newline\dAny digit (0-9)\DAny non-digit\wWord character (letter, digit, underscore)\WNon-word character\sWhitespace character\SNon-whitespace characterAnchors
^Start of string or line$End of string or line\bWord boundary\BNot a word boundaryQuantifiers
*Zero or more of the previous+One or more of the previous?Zero or one of the previous (optional){n}Exactly n times{n,}n or more times{n,m}Between n and m times*?Zero or more, non-greedy (as few as possible)Groups
(...)Capture group(?:...)Non-capturing group(?<name>...)Named capture group(?=...)Positive lookahead(?!...)Negative lookahead(?<=...)Positive lookbehind(?<!...)Negative lookbehindCharacter sets
[abc]Any one of a, b, or c[^abc]Any character except a, b, or c[a-z]Any character from a to zAlternation
a|bEither a or bFlags
gGlobal — find all matches, not just the firstiCase-insensitive matchingmMultiline — ^ and $ match line boundariessDotall — . also matches newlinesWhat is this tool?
Regex Cheatsheet is a searchable quick reference for common regular expression syntax, tokens, character classes, quantifiers, groups, anchors, and other commonly used regex constructs.
How does it work?
Search the cheatsheet by regex symbol, keyword, or concept to quickly find the syntax you need. The reference is available directly in your browser so you can look up common patterns without searching through lengthy documentation.
Key features
- Search common regex syntax quickly
- Reference regex tokens and metacharacters
- Look up character classes and quantifiers
- Review anchors, groups, and common constructs
- Useful for beginners and experienced developers
- Quick browser-based regex reference
How to use
- Open the Regex Cheatsheet.
- Search for a regex symbol, keyword, or concept.
- Review the matching syntax and explanation.
- Use the reference while writing or debugging a regex pattern.
- Return to the cheatsheet whenever you need a quick syntax reminder.
FAQ
What is a regex cheatsheet useful for?
A regex cheatsheet provides a quick reference for common regular expression syntax so you can look up patterns without searching through full documentation.
Can beginners use this regex reference?
Yes — it can help beginners learn common regex syntax while also serving as a quick reference for experienced developers.
What regex syntax can I look up?
The reference covers common constructs such as character classes, quantifiers, anchors, groups, and other frequently used regex syntax.
Does Regex Cheatsheet require an internet connection after loading?
The reference is designed to work as a browser-based tool, but availability of its resources can depend on how the website is loaded and served.
