What does HackerNews think of libphonenumber?
Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.
It’s trivial for computers. For example, using Google’s libphonenumber [0]. For example, Poland uses `000 000 000` for mobiles, and `00 000 00 00` for landlines. libphonenumber knows how to handle this [1]:
21|
39|
45|
5[0137]|
6[0469]|
7[02389]|
8(?:
0[14]|
8
)
$1 $2 $3
1[2-8]|
[2-7]|
8[1-79]|
9[145]
$1 $2 $3 $4
[0]: https://github.com/google/libphonenumber
[1]: https://github.com/google/libphonenumber/blob/master/resourc...Just in case somebody considers implementing phone number parsing and normalizing: Just don't and use Googles libphonenumber, which offers solid, ready to use implementations in various languages (there also exist ports for other languages too): https://github.com/google/libphonenumber/
[1] https://csvkit.readthedocs.io/en/1.0.3/scripts/csvclean.html
[2] https://pypi.org/project/Unidecode/
[3] https://pypi.org/project/transliterate/
[4] https://pypi.org/project/charset-normalizer/
[5] https://pypi.org/project/cchardet/
[6] https://pypi.org/project/phonenumbers/
[7] which is a python port of Google's libphonenumber: https://github.com/google/libphonenumber