Regex Cheatsheet

Quick reference for common regular expression patterns.

Basics

.Any character
\dDigit (0-9)
\wWord char (a-z,A-Z,0-9,_)
\sWhitespace
\bWord boundary
^Start of string
$End of string

Quantifiers

*0 or more
+1 or more
?0 or 1
{3}Exactly 3
{3,}3 or more
{3,5}3 to 5

Groups

(abc)Capture group
(?:abc)Non-capture group
a|bEither a or b
[abc]Any of a, b, c
[^abc]Not a, b, or c
[a-z]Range a to z

Common Patterns

\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,}\bEmail
https?://[^\s]+URL
\b\d{3}[-.]?\d{3}[-.]?\d{4}\bPhone
\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\bIPv4
#[0-9A-Fa-f]{6}HEX Color

About Regex Cheatsheet

This is a free, fast, and fully client-side regex cheatsheet tool. All processing is done locally within your browser to ensure maximum privacy and security. No data is sent to our servers. Bookmark this page for quick access to ad-free, high-performance SEO and developer utilities.