0

I am working on an app which gets a phone number with or without country code to call or to send sms. Now all I want to know, is there any functionality / pattern with which I can detect the country code of a number which doesn't contain the country code.

For example I have the number:
1. 0167-xxxx-xxx
2. 0171-xxxx-xxx
3. 3212-xxx-xxx
4. 4808-xxx-xxx

Here, the first two numbers are from Bangladesh and last two numbers are from Usa. So, is there any way to determine / differentiate the country from those numbers?

4

1 回答 1

2

So, is there any way to determine / differentiate the country from those numbers?

No, you simply can't and that's why country codes are used.

于 2016-11-13T11:38:55.393 回答