[BangPypers] regular expression for Indian landline numbers
Kenneth Gonsalves
lawgon at au-kbc.org
Thu Nov 25 10:41:34 CET 2010
hi,
on looking at the telephone book, Indian landline numbers have three
forms
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:
r'(^0\d{2}[-\s]{1}[1-6]{1}\d{7})|(^0\d{3}[-\s]{1}[1-6]{1}\d{6})|(^0
\d{4}[-\s]{1}[1-6]{1}\d{5})'
any clues on how to make it shorter? And any info as to whether my
assumptions as to the landline numbers is correct?
--
regards
Kenneth Gonsalves
More information about the BangPypers
mailing list