⚡ 100% In-Browser & Private: Your data never leaves your computer. Powered by Cloudflare Edge CDN.
ProWebTools PRO
Developer & SEO Utilities
35+ Patterns

Regular Expressions (Regex) Cheat Sheet & Quick Reference

The definitive Regular Expression cheat sheet: character sets, greedy vs lazy quantifiers, positive/negative lookarounds, and RFC email/URL patterns with 1-click copy.

Character Classes (9 commands)

Character Classes
\d

Matches any single digit character from 0 through 9.

Character Classes
\D

Matches any single character that is not a numeric digit.

Character Classes
\w

Matches alphanumeric characters and underscore. Universal identifier pattern.

Character Classes
\W

Matches any symbol, punctuation, or whitespace character.

Character Classes
\s

Matches spaces, tabs, line breaks (\r, \n), and form feeds.

Character Classes
\S

Matches any visible, non-space character.

Character Classes
.

Matches any single character except newline (unless dotAll flag "s" is active).

Character Classes
[a-z0-9_]

Matches any single character enclosed within the brackets.

Character Classes
[^aeiou]

Matches any single character NOT present in the brackets.

Quantifiers & Multipliers (7 commands)

Quantifiers & Multipliers
*

Matches preceding token 0 or more times as much as possible.

Quantifiers & Multipliers
+

Matches preceding token at least 1 or more times.

Quantifiers & Multipliers
?

Makes the preceding token optional (0 or 1 time).

Quantifiers & Multipliers
{n}

Matches exactly n repetitions of the preceding token.

Quantifiers & Multipliers
{2,5}

Matches between min and max occurrences inclusive.

Quantifiers & Multipliers
*?

Stops matching at the earliest possible opportunity.

Quantifiers & Multipliers
cat|dog

Matches either the expression on the left or the one on the right.

Anchors & Boundaries (4 commands)

Anchors & Boundaries
^

Asserts position at the start of string (or line in multiline mode).

Anchors & Boundaries
$

Asserts position at the end of string (or line in multiline mode).

Anchors & Boundaries
\b

Asserts position at a word boundary (between \w and \W).

Anchors & Boundaries
\B

Matches any position that is not a word boundary.

Groups & Lookarounds (6 commands)

Groups & Lookarounds
(\w+)

Groups multiple tokens together and captures matching text for backreferences.

Groups & Lookarounds
(?:abc)

Groups tokens for quantification without allocating backreference memory.

Groups & Lookarounds
(?=pattern)

Asserts that the given pattern matches immediately after current position.

Groups & Lookarounds
(?!pattern)

Asserts that the given pattern does NOT match immediately after current position.

Groups & Lookarounds
(?<=pattern)

Asserts that the given pattern matches immediately before current position.

Groups & Lookarounds
(?<!pattern)

Asserts that the given pattern does NOT match immediately before current position.

Production Patterns (7 commands)

Production Patterns
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$

Validates standard email format with modern gTLDs.

Production Patterns
^(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$

Matches valid IPv4 addresses from 0.0.0.0 to 255.255.255.255.

Production Patterns
^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$

Full web URL validator including query parameters and ports.

Production Patterns
^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$

Matches standard ISO 8601 calendar date formats.

Production Patterns
^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$

Validates 3 or 6 digit hex color codes with leading pound sign.

Production Patterns
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$

Minimum 8 chars: at least 1 uppercase, 1 lowercase, 1 number, 1 special character.

Production Patterns
^[a-z0-9]+(?:-[a-z0-9]+)*$

Validates lowercase, hyphen-separated SEO friendly URL slugs.