DrHyde / perl-modules-Number-Phone

Number::Phone and friends
24 stars 31 forks source link

nationalPrefixForParsing support #77

Closed dracos closed 6 years ago

dracos commented 7 years ago

Would there be interest in adding support for libphonenumber's nationalPrefixForParsing, so that e.g. an entered Brazil phone number of 0318522222222 could be parsed as national number 8522222222. At present, the generated stub code will only strip a provided nationalPrefix.

It looks like it might be straightforward to have this use the nationalPrefixForParsing regular expression if present in preference to nationalPrefix, and I could look at doing this if it was something that would be useful.

DrHyde commented 6 years ago

NB for people coming here from looking at the changelog, the 31 in 03185 is a carrier select code.