[BangPypers] regular expression for Indian landline numbers
Anand Balachandran Pillai
abpillai at gmail.com
Thu Nov 25 11:26:13 CET 2010
On Thu, Nov 25, 2010 at 3:11 PM, Kenneth Gonsalves <lawgon at au-kbc.org>wrote:
> on looking at the telephone book, Indian landline numbers have three
> 3 digit STD code followed by 8 digits
> 4 digit STD code followed by 7 digits
> 5 digit STD code followed by 6 digits
> the first digit of the STD code has to be 0. The first digit of the
> landline number starts from 1-6. Of course I am not dead sure of the
> starting numbers, but I have seen mobile numbers starting with 9 and 8,
> and I think 7 is also reserved for mobile. I could not find any
> authorative info on this. This is the re:
It is doable, but you should really use pyparsing for this - this is UGLY !
Meanwhile, let me hack on it.
> any clues on how to make it shorter? And any info as to whether my
> assumptions as to the landline numbers is correct?
> Kenneth Gonsalves
> BangPypers mailing list
> BangPypers at python.org
More information about the BangPypers