[BangPypers] regular expression for Indian landline numbers

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


On Thu, 2010-11-25 at 16:17 +0530, Lakshman Prasad wrote:
> Rather than flexing the regex to everything it *can do*, I'd do the
> following:
> 
> * Capture 2 parts of the number separated by a "-" or a
> whitespace: /^(\d+)[
> \-]+(\d+)$/
> * Use the captured parts to verify the lengths etc, using simple
> normal
> python. 

sure - I can think of several ways to do this, but as explained, I need
a regex.
-- 
regards
Kenneth Gonsalves



More information about the BangPypers mailing list