Common Regex Patterns
browse and copy 100+ common regex patterns for email, URL, phone, and more
By Bikram NathLast updated
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.
Interactive Common Regex Patterns — coming soon
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 →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.