title: What does this Django regular expression mean? `?P`
body: <p>I have the following regular expression (regex) in my <code>urls.py</code> and I'd like  to know what it means. Specifically the <code>(?P&lt;category_slug&gt;</code> portion of the regex.</p>
  <pre class="lang-py prettyprint-override"><code>r'^category/(?P&lt;category_slug&gt;[-\w]+)/$
  </code></pre>