How are extensions (e.g., 111-222-3333 x 44444) going to be handled? Even if you could write a big, hairy validator that would allow all the different legitimate formats, it would end up allowing pretty much anything even remotely resembling a phone number in the first place. Here's a regex for a 7 or 10 digit number, with extensions allowed, delimiters are spaces, dashes, or periods: ^(? Honestly, I would recommend you don't try to validate phone numbers. The international accounts for an optional initial ' ' and country code. Valid matches would be: My gut feeling is reinforced by the amount of replies to this topic - that there is a virtually infinite number of solutions to this problem, none of which are going to be elegant. If you're talking about form validation, the regexp to validate correct meaning as well as correct data is going to be extremely complex because of varying country and provider standards. I interpret the question as looking for a broadly valid pattern, which may not be internally consistent - for example having a valid set of numbers, but not validating that the trunk-line, exchange, etc. North America is straightforward, and for international I prefer to use an 'idiomatic' pattern which covers the ways in which people specify and remember their numbers: The North American pattern makes sure that if one parenthesis is included both are.
And while stripping all/most non-numeric characters may work well on the server side (especially if you are planning on passing these values to a dialer), you may not want to thrash the user's input during validation, particularly if you want them to make corrections in another field.
My test script downloads a file from the internet and prints all the phone numbers in it. Maintaining a complex rule-set which could be outdated at any point in the future by any country in the world does not sound fun.
Validating number comments