DrHyde / perl-modules-Number-Phone

Number::Phone and friends

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nationalPrefixForParsing support

dracos opened this issue · comments

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.

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