Re: Regex assistance

2008-07-01 Thread mike171562

Gul,

   That was it, thx a bunch..

On Jul 1, 10:27 am, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 1, 2008 at 11:15 AM, John Lenton <[EMAIL PROTECTED]> wrote:
> >> local numbers start with 281, 832, 713 , or 1281, 1832, or 1713, my
> >> regex which isnt working looks like this
>
> > in other words, local numbers match the regex
>
> >  r'^(?:281|832|713|1281|1832|1713)'
>
> Or, to simplify it even further, and make it easier to add new area
> codes later on, if any crop up:
>
> r'^1?(281|832|713)'
>
> -Gul
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Regex assistance

2008-07-01 Thread Marty Alchin

On Tue, Jul 1, 2008 at 11:15 AM, John Lenton <[EMAIL PROTECTED]> wrote:
>> local numbers start with 281, 832, 713 , or 1281, 1832, or 1713, my
>> regex which isnt working looks like this
>
> in other words, local numbers match the regex
>
>  r'^(?:281|832|713|1281|1832|1713)'

Or, to simplify it even further, and make it easier to add new area
codes later on, if any crop up:

r'^1?(281|832|713)'

-Gul

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Regex assistance

2008-07-01 Thread John Lenton

On Tue, Jul 1, 2008 at 12:12, mike171562 <[EMAIL PROTECTED]> wrote:
>
> Hello,
>   I am trying to build a regex for a query that excludes local phone
> numbers from a list of calls thus leaving only long distance.  I dont
> have alot of experience with the "re" module
>
> local numbers start with 281, 832, 713 , or 1281, 1832, or 1713, my
> regex which isnt working looks like this

in other words, local numbers match the regex

  r'^(?:281|832|713|1281|1832|1713)'


-- 
John Lenton ([EMAIL PROTECTED]) -- Random fortune:
The trouble with a lot of self-made men is that they worship their creator.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---