phone number prefix
How 开发者_StackOverflowwould I take a phone number like: 15556667777 and some how get its country code (prefix, the 1).. But, the issue is.. I will have to be able to get ANY numbers country prefix from any phone number. So whether it be UK, AU, US, any INTL country.
It seems like a pretty complicated parsing, with lots of exceptions. You should try some libraries for this purpose:
Google's library: http://code.google.com/p/libphonenumber/ (Java and JavaScript versions)
There's a python port: http://pypi.python.org/pypi/phonenumbers/3.3a1
精彩评论