Before you say that this has already been asked, know that I've already reviewed these:
- Is there a standard for storing normalized phone numbers in a database? - This is from 2008, and says that, at the time, there was no such standard. I'm hoping that something changed in the last 13 years.
- How to validate phone numbers using regex - I already have the parse; it's quite easy: If it's not a digit, skip it. This question is not about the parser, but the format in which I save/display it. I am not worried about how hard it is to parse, but whether it's in standard format.
Say I'm working on a program that has to deal with phone numbers, and I want to make sure that they're saved and displayed in a standard format, so other programs and humans can also understand them predictably & consistently.
For instance, I've seen the following all be valid representations for the same US phone number:
1234567123-4567123 45675551234567(555) 1234567555-1234567555 123 4567555-123-4567(555)-123-4567(555) 123-4567(5) 123 45671-555-123-4567(1) 555-123-4567+1 555-123-4567+1 555 123-4567+1 (555) 123-4567- Ad nauseum…
And then different countries represent numbers in different ways:
55 1234 567 890155 12 3456 789055 123 456 789055 1234 567890555 123 456(55) 123 45675.555.123-45-67- Ad nauseum…
As you can see, the number of ways a user can see a valid phone number is nearly infinite (The Wikipedia page for Telephone numbers in the UK is 26 printer pages long). I want all the numbers in my database and on the screen to be in a universally-recognizable format. As far as I can tell, ISO and ANSI have no defined format. Is there any standard notation for phone numbers?