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
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
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
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
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
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
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+)/$')
>
>
$ 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
$ 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
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
10 matches
Mail list logo