I have the following regular expression (regex) in my urls.py
and I\'d like to know what it means. Specifically the (?P
portion o
(?P
creates a match group named category_slug
.
The regex itself matches a string starting with category/
and then a mix of alphanumeric characters, the dash -
and the underscore _
, followed by a trailing slash.
Example URLs accepted by the regex: