Re: slug regular expression: which should I use

2009-08-10 Thread J0hnsmith
Thanks Eric, that does answer my question. On Aug 10, 3:03 pm, Eric Abrahamsen wrote: > On Aug 10, 2009, at 1:56 PM, J0hnsmith wrote: > > > > > Which should I use to match a slug made using slugify? > > > (?P[a-zA-Z0-9-]+) > > > or > > > (?P[\w-]+) > > They're not exactly the

Re: slug regular expression: which should I use

2009-08-10 Thread Eric Abrahamsen
On Aug 10, 2009, at 1:56 PM, J0hnsmith wrote: > > Which should I use to match a slug made using slugify? > > (?P[a-zA-Z0-9-]+) > > or > > (?P[\w-]+) They're not exactly the same. Most of the time \w is alphanumeric (ie equivalent to your first regex) but Django compiles the RegexURLPattern

slug regular expression: which should I use

2009-08-10 Thread J0hnsmith
Which should I use to match a slug made using slugify? (?P[a-zA-Z0-9-]+) or (?P[\w-]+) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to