Re: Q regex

2009-10-06 Thread Tim Chase
Karen Tracey wrote: > On Tue, Oct 6, 2009 at 1:32 PM, Mat wrote: > >> Okay so here is my code: >> >> **This way works and does not error** >> rs = BadActor.objects.filter(addr__iregex='^(192\.188\.)(.*)(\.20)$'); >> print len(rs); >> print rs[0].addr >> >> ***This way errors

Re: Q regex

2009-10-06 Thread Karen Tracey
On Tue, Oct 6, 2009 at 1:32 PM, Mat wrote: > > Okay so here is my code: > > **This way works and does not error** > rs = BadActor.objects.filter(addr__iregex='^(192\.188\.)(.*)(\.20)$'); > print len(rs); > print rs[0].addr > > ***This way errors > q = Q({'addr__iregex':'^(192\

Q regex

2009-10-06 Thread Mat
Okay so here is my code: **This way works and does not error** rs = BadActor.objects.filter(addr__iregex='^(192\.188\.)(.*)(\.20)$'); print len(rs); print rs[0].addr ***This way errors q = Q({'addr__iregex':'^(192\.188\.)(.*)(\.20)$'}); rs = BadActor.objects.filter(q); print