ilovekit

Common Regex Pattern Library

6 tools

Browse categorized regex patterns for emails, dates, and more.

Runs in your browser — your files and text stay on your device

Browse a categorized library of common regex patterns for emails, URLs, dates, phone numbers and more. Copy a pattern as a starting point and adapt it. Patterns for things like email addresses are approximations, so validate important input another way too.

Regex TesterCheatsheetFind & ReplaceMatch BreakdownPlain-English ExplainerCommon Patterns Library

Contact info

^[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}$
^\+?1?[-.\s]?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$
^\+\d{1,3}[-.\s]?\d{4,14}$

Web

^https?:\/\/[\w.-]+(\.[a-zA-Z]{2,})+([\/\w.-]*)*\/?$
^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$
^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$
^#(?:[0-9a-fA-F]{3}){1,2}$

Identity & Finance

^\d{3}-\d{2}-\d{4}$
^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14})$
^[A-Z]{2}\d{2}[A-Z0-9]{1,30}$

Dates & Numbers

^\d{4}-\d{2}-\d{2}$
^\d{1,2}\/\d{1,2}\/\d{4}$
^-?\d+(\.\d+)?$
^\d{5}(-\d{4})?$

Passwords & Usernames

^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{8,}$
^[a-zA-Z0-9_]{3,16}$

Frequently asked questions

Are these patterns production-ready?

They cover the common cases well, but for anything security-critical (like SSNs or credit cards) treat them as a starting point, not a full validator.

How do I test one on my own text?

Copy it and switch to the Regex Tester tab to try it against sample input.

Guides

All guides →