As with all advice, feel free to drop by and suggest a better library / module! REL makes no claims that these are the best modules, just a few that seem to do the job from some quick searching.

What no one should say ever:

I know, I'll just parse this phone number with a regex real quick...

There have been attempts. There have been failures. Part of the wonder of the problem is how many overlapping, competing, and supplemental standards every country has crammed into phone numbers.

Finally, someone open sourced a decent phone number parser, libphonenumber, available for free on a very agreeable license. Just use it if you can, or find something of comparable quality for your language / platform / setup. And if you still want to roll your own, I’m sure you’ll have fun covering all of the cases they did in their 2,462 commits.

The truth is probably scarier than you think - phone numbers aren’t really standard - everything that the phone system can route generally… goes through… somewhere. Did you know that A, B, C, and D were all standardized in DTMF (touchtones)? There are still phone systems that use them.

Yes, they did standardize phone number formats, you can read all about E.164. Then try telling your aunt how to add a plus to a phone number.