Common Regex Patterns

Copy-paste ready Regular Expressions for validating phone numbers.

2024-11-15Development

US Phone Regex

^\+?1?[-.]?\(?([0-9]{3})\)?[-.]?([0-9]{3})[-.]?([0-9]{4})$

E.164 Regex

^\+[1-9]\d{1,14}$

Always validate on the backend as well as the frontend!

Pair generation with regex tests

Download JSON packs and run the regex snippets from this article.

After the jump, keep uniqueness on and export JSON so you can run the regex assertions right away.