Le Monday 30 June 2008 16:53:54 Support Desk, vous avez écrit :
sounds like str.startswith( ) is enough for your needs:
if not number.startswi th(('281', '713', '832', ...)) :
...
--
Cédric Lucantis
Hello,
I am working on a web-app, that querys long distance numbers from a
database of call logs. I am trying to put together a regex that matches any
number that does not start with the following. Basically any number that
does'nt start with:
>
>
>
281
>
713
>
832
>
>
>
or
>
>
>
1281
>
1713
>
1832
>
>
>
>
>
is long distance any, help would be appreciated.
I am working on a web-app, that querys long distance numbers from a
database of call logs. I am trying to put together a regex that matches any
number that does not start with the following. Basically any number that
does'nt start with:
>
>
>
281
>
713
>
832
>
>
>
or
>
>
>
1281
>
1713
>
1832
>
>
>
>
>
is long distance any, help would be appreciated.
if not number.startswi th(('281', '713', '832', ...)) :
...
--
Cédric Lucantis