How to split mobile number into country code, area code and local number? e.g +919567123456 after split
country code = 91
area code = 9567
local numb
It's not possible to parse phone numbers with a simple algorithm, you need to use data tables populated with each country's rules - because each country delimits their phone numbers differently.
The country code is fairly easy, just use the data from from the Country calling codes article in wikipedia and build a table of all the unique country codes. Each country has a unique prefix, so that's easy.
But then you need to look up the rules for every country you want to support and extract the area code(s) using the rules for each country.