Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-06 Thread John M
WOW! and again WOW! Thank you all for your quick and thorough responses, I now have it, perfect Thanks again, John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-06 Thread Jan Claeys
Op ma, 05-06-2006 te 21:44 -0500, schreef Jeremy Dunck: > Kodos is a nice utility for fiddling with regexs: 'Kiki' is another one, written in wxPython. -- Jan Claeys --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-06 Thread Simon Willison
On 6 Jun 2006, at 03:26, John M wrote: > how does that differ from > > (r'^polls/'), > (r'^polls/(\d+)/$') > > Note the $ is missing from the first line of the second example. > > When you don't have a $ in the polls/ setup, it doesn't scan down to > the other entries. > > Since I'm so

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-05 Thread Matt McDonald
Hi John, The $ at the end of a regular expression means that it is the end of the string and nothing else comes after it. So '^polls/' would match 'polls/things' where '^polls/$' wouldn't. On a similar note the ^ character means the beginning of a string. On 06/06/2006, at 12:26 PM, John M w

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-05 Thread Todd O'Bryan
On Jun 5, 2006, at 10:26 PM, John M wrote: > > Ok, so im gong through the turtorial and trying to adopt it to my own > project, and I see this in urlpatterns: > > (r`^polls/$'), > (r'^polls/(\d+)/$') > > how does that differ from > > (r'^polls/'), > (r'^polls/(\d+)/$') > > Note th

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-05 Thread Jeremy Dunck
On 6/5/06, John M <[EMAIL PROTECTED]> wrote: > (r`^polls/$'), > (r'^polls/(\d+)/$') > > how does that differ from > > (r'^polls/'), > (r'^polls/(\d+)/$') The strings in the first element of the tuple are regular expressions (aka regex). That's a complex but powerful text matching

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-05 Thread Malcolm Tredinnick
On Mon, 2006-06-05 at 19:26 -0700, John M wrote: > Ok, so im gong through the turtorial and trying to adopt it to my own > project, and I see this in urlpatterns: > > (r`^polls/$'), > (r'^polls/(\d+)/$') > > how does that differ from > > (r'^polls/'), > (r'^polls/(\d+)/$') > >

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-05 Thread Scott Anderson
$ in a regular expression means "match the end of the line." What this means is that the first one, ^polls/$, means "match any url that starts and ends with polls/". If you omit the $, it means "match any url that starts with polls/, but ends with anything". So in your second example, the first re

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-05 Thread Bryan L. Fordham
$ is part of the regular expression. It matches the end of the line. ^ matches the beginning So, '^polls/(\d+)/$' would match polls/1234/ but not polls/1234/1 because the ending is wrong, and not the_polls/1234/ because the beginning is wrong You can read more about this at http://d

Serious Noobie question, what the $ for in urlpatterns.

2006-06-05 Thread John M
Ok, so im gong through the turtorial and trying to adopt it to my own project, and I see this in urlpatterns: (r`^polls/$'), (r'^polls/(\d+)/$') how does that differ from (r'^polls/'), (r'^polls/(\d+)/$') Note the $ is missing from the first line of the second example. When y