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 new to python and web stuff, was wondering if anyone > could > explain this. Those strings are Python regular expressions. The dollar sign at the end means "match the end of the string". The regular expressions are tried against the URL that has been entered in order. '^polls/' without a $ will match any URL that starts with the string 'polls/', thus terminating the lookup at that point. If you include the dollar, strings that start with polls/ but continue after the / will no longer match that particular pattern. Hope that helps, Simon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---