-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAlEmnJYACgkQuYLL1cDjHx3xNACeMNEiZY0wFwKH0s5m+s8dHKFp
xs0AnjSfcHbXtT+FjdIynlX8RY05N5IU
=+wWP
-----END PGP SIGNATURE-----
On Thu, 21 Feb 2013 15:41:12 -0500 Bill Freeman <ke1g.nh@gmail.com>
wrote:
> Not quite right either, even if it didn't have the non matched open
> parenthesis after the carat, since it would match
> "foo-bar--1234.html".
>
> Perhaps '^(?:[a-zA-Z0-9]+-)+(?P<nid>\d+).html$'
>
> (?:...) is a non-capturing group, if you're not familiar with it.
Right, thats better. But this pattern is actually matching one
non-capture-group for each - in the url? Not that this would be a
problem though.
I never yet had the need to regex a part of the
url and then not use it as argument for the view...
Have fun,
Arnold
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment