Should be trivial to do with a regular expression.

On Oct 15, 10:29 am, Greg <[EMAIL PROTECTED]> wrote:
> Andres,
> Using Python...how would I take out all the numeric subsequences in my
> message and store them in a list?
>
> On Oct 15, 3:11 am, Andreas Pfrengle <[EMAIL PROTECTED]> wrote:
>
> > > I'm thinking that I might have to create a for loop, which loops
> > > through every Discounter record and checks to see if the 'code'
> > > variable is in the 'message variable.
>
> > Depending on the number of your Discounter-records, this can result in
> > many queries.
> > Perhaps instead you could take every consecutive subsequence of
> > numbers out of your message, store them in a list (converted to int),
> > and then search:
> > Discounter.objects.filter(code__in=numberlist).
>
> > Andreas


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to