/^/
100% client-side · nothing leaves your browser

Learn Regular Expressionsthe Easy Way

100+ production-ready regex patterns with explanations, language examples, an interactive playground, and complete learning resources.

100+Regex Patterns
220+Topics & Tags
LiveInteractive Playground
12+Programming Languages

Most used

Popular Regex Patterns

The patterns developers reach for most — email, URLs, UUIDs, and more.

View all →
MediumValidation

Email Regex

Validates common email address formats by requiring a local part, an @ symbol, a domain, and a top-level domain of at least two letters.

^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$
MediumWeb

URL Regex

Validates HTTP and HTTPS URLs with a required host containing at least one dot, an optional port, and an optional path, query, or fragment.

^https?:\/\/[\w-]+(\.[\w-]+)+(:\d+)?([\/?#][^\s]*)?$
EasyNumbers

Integer Regex

Validates a whole number with an optional leading minus sign, disallowing decimal points and unnecessary leading zeros.

^-?(0|[1-9]\d*)$
EasyWeb

Hex Color Code Regex

Validates a CSS hex color code in either the six-digit (#RRGGBB) or shorthand three-digit (#RGB) form.

^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$
EasyProgramming

UUID Regex

Validates a standard 8-4-4-4-12 hyphenated UUID string, including the version nibble and RFC 4122 variant bits.

^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
MediumSecurity

JWT (JSON Web Token) Regex

Checks that a string has the three-part, dot-separated base64url shape of a JSON Web Token (header.payload.signature) without decoding or verifying the signature.

^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$
EasyNumbers

Percentage Regex

Validates a percentage value: a signed integer or decimal number immediately followed by a trailing percent sign.

^-?\d+(\.\d+)?%$
EasyDates

ISO 8601 Date Regex

Validates a calendar date in ISO 8601 YYYY-MM-DD format, checking that the month is 01-12 and the day is 01-31.

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

Browse by topic

Featured Categories

Every pattern is organized into a category so you can find what you need fast.