Extract country codes from a list of phone numbers


If you had a list of phone numbers (with country code included), example:


How would you identify from which country is each phone number considering the country codes (LITHUANIA +370) (UK +44) (USA +1)?

The idea is to be able to build an expression that does this in a scalable way that can consider all the country codes in the world, not only the 3 presented in the example above. So building one expression per country code is not intended.

All the countries are saved as a data type with its country code as a data field.

Any help would be appreciated, thanks!

You could use Twilio lookup API to validate the numbers. ISO country code is one of the returned parameters.

V1 API linked below but they have an updated V2 api as well

1 Like