Regex Patterns Library

Hand-crafted regular expressions for the patterns you actually validate every day — email, URL, IP, UUID, phone, ISO date, hex color, ZIP, and more. Each page shows the pattern, breaks down what every part matches, gives you three examples that match + three that don't, and drops you into the browser regex tester with the pattern pre-loaded.

Validation patterns

Why another regex library?

Most regex "cheat sheets" online copy-paste the same 6,000-character RFC-perfect email pattern that catches 100% of valid emails and 0% of what you actually want to allow. Every pattern here is chosen for the 99% case — strict enough to catch the common mistakes, simple enough to read in 30 seconds, and small enough to avoid the catastrophic backtracking traps that make "correct" regex freeze your app.

Each pattern is anchored (^...$) for full-string validation. Drop the anchors if you want to search for the pattern inside a larger string. All patterns are tested in JavaScript RegExp, PCRE (PHP, Nginx), and Python re.

Related tools