Common Regex Patterns
browse and copy 100+ common regex patterns for email, URL, phone, and more
Interactive Common Regex Patterns — coming soon
In development. We're still building the interactive Common Regex Patterns. The guide below explains exactly what it does and how to use it. In the meantime, here are DevLab tools that already work in your browser:
Browse all working tools →This is a reference library of 100+ tested regex patterns for email, URL, phone, date, credit card, and IP address validation -- each copyable and testable against your own input without leaving the page. The email patterns go beyond the naive [^@]+@[^@]+ shortcut and correctly handle subdomains and multi-part TLDs. Unlike regex101, patterns here are pre-categorized so you are finding rather than building.
What is Common Regex Patterns?
The tool is a searchable library of pre-written regular expressions grouped by category: email, URL, phone number, date, credit card, IP address, and more. Instead of copying a pattern from a Stack Overflow answer of unknown age, you pick a category, inspect the pattern, and test it against your own string in the same interface. A phone number pattern, for example, lets you paste a sample like '+44 7911 123456' and confirm it matches before dropping the regex into your codebase.
Developers reach for this when they need a verified starting point rather than a blank editor. regex101 is the right choice when you are debugging an unfamiliar pattern or need its step-by-step match explanation and flavor selector. This library fits the opposite situation: the problem is common enough that a known-good pattern already exists and the job is retrieval, not construction.
One technical note that matters in practice: JavaScript's RegExp engine gained lookbehind assertions ((?<=...) and (?<!...)) in ECMAScript 2018, but Safari did not ship them until version 16.4, released March 2023. If a pattern in the library uses a lookbehind, it will throw a SyntaxError in older Safari. Check MDN's browser compatibility table before shipping a lookbehind-dependent pattern to a consumer product with broad Safari coverage.
When to use Common Regex Patterns
- Grab a pre-tested credit card pattern to add client-side format validation before a Stripe API call, cutting unnecessary round-trips on malformed input.
- Audit a legacy codebase's homegrown email regex by comparing it against the library's version to spot exactly where the in-house one breaks.
- Prototype a multi-country phone validation field without spending 30 minutes researching E.164 format rules and country-code prefix ranges from scratch.
Frequently Asked Questions
Do the email patterns here handle the full RFC 5322 specification?
Why do the URL patterns fail to match localhost or bare IP addresses?
Can these patterns be used directly in Python, Go, or Java, or are they JavaScript-specific?
Why does the date regex match February 31st or April 31st as valid?
Which IP address pattern covers IPv6 as well as IPv4?
Related Tools
- Regex Testertest and debug regular expressions with real-time matching · Regex
- Regex Explainerbreak down a regex pattern into plain English with visual diagrams · Regex
- Regex Cheatsheetbrowse a complete regex syntax reference with live examples · Regex
- Regex to String Generatorgenerate matching strings from a regex pattern · Regex
Learn more
- Regex Basics: A Complete Beginner's GuideLearn regular expressions from scratch. Understand patterns, metacharacters, and how to write your first regex.
- Regex for Email Validation: The Right ApproachLearn why perfect email regex is impossible, what a practical validation pattern looks like, and when to use client-side vs server-side validation.
- What is Regex? Complete Guide for DevelopersMaster regular expressions from patterns and flags to groups, lookahead, named captures, and common mistakes across JavaScript, Python, and other languages.