9 patterns
Phone Number Validation Regex Patterns
Phone number validation varies enormously by country. These patterns cover international E.164 format, French numbers, US numbers, and flexible formats that accept common separators like spaces, dashes, and parentheses.
Common Use Cases
All Phone Number Validation Patterns
French Mobile Phone
French mobile numbers (06/07) with or without formatting.
^(?:(?:\+|00)33|0)[67](?:[\s.-]?\d{2}){4}$French Landline Phone
French landline numbers (01-05) with or without formatting.
^(?:(?:\+|00)33|0)[1-5](?:[\s.-]?\d{2}){4}$International Phone
International E.164 format (max 15 digits).
^\+?[1-9]\d{1,14}$US Phone
US format with variations (555-123-4567).
^(?:\+?1[-.\s]?)?\(?([0-9]{3})\)?[-.\s]?([0-9]{3})[-.\s]?([0-9]{4})$Phone Extraction
Extracts various phone number formats.
(?:\+\d{1,3}[-.\s]?)?(?:\(?\d{1,4}\)?[-.\s]?)?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}German Phone Number
Validates German phone numbers (mobile and landline).
^(\+49|0)[1-9][0-9]{7,11}$UK Phone Number
Validates UK phone numbers (mobile 07xxx and landline).
^(\+44|0)7[0-9]{9}$|^(\+44|0)[1-9][0-9]{9}$Spanish Phone Number
Validates Spanish phone numbers (9 digits, starts with 6-9).
^(\+34)?[6-9][0-9]{8}$Italian Phone Number
Validates Italian phone numbers (mobile 3xx and landline 0xx).
^(\+39)?3[0-9]{8,9}$|^(\+39)?0[0-9]{7,9}$Frequently Asked Questions
What is the best regex for international phone numbers?
E.164 format: ^\+[1-9]\d{6,14}$ - it covers all valid international numbers.
Should I validate phone numbers with regex?
Regex is good for basic format checking. For production, consider a library like libphonenumber that handles country-specific rules.
How do I allow spaces and dashes in phone input?
Use a flexible pattern and normalize before saving: strip all non-digits from the input.
Looking for patterns in other categories?
Browse all 209 patterns