[BangPypers] regular expression for Indian landline numbers

Kenneth Gonsalves lawgon at au-kbc.org
Thu Nov 25 11:40:05 CET 2010


On Thu, 2010-11-25 at 15:56 +0530, Anand Balachandran Pillai wrote:
> > 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})'
> >
> 
> It is doable, but you should really use pyparsing for this - this is
> UGLY ! 

I know - but everything I tried to make it look good did not work. And
the app in which I am plugging this into requires an re.
-- 
regards
Kenneth Gonsalves



More information about the BangPypers mailing list