title: Making a Regex Django URL Token Optional
body: <p>You have a URL which accepts a <code>first_name</code> and <code>last_name</code> in Django:</p>
  
  <pre><code>('^(?P&lt;first_name&gt;[a-zA-Z]+)/(?P&lt;last_name&gt;[a-zA-Z]+)/$','some_method'),
  </code></pre>
  
  <p>How would you include the OPTIONAL URL token of <code>title</code>, without creating any new lines. What I mean by this is, in an ideal scenario:</p>
  
  <pre><code>#A regex constant
  OP_REGEX = r'THIS IS OPTIONAL&lt;title&gt;[a-z]'
  #Ideal URL
  ('^(?P&lt;first_name&gt;[a-zA-Z]+)/(?P&lt;last_name&gt;[a-zA-Z]+)/OP_REGEX/$','some_method'),
  </code></pre>
  
  <p>Is this possible without creating a new line i.e.</p>
  
  <pre><code>('^(?P&lt;first_name&gt;[a-zA-Z]+)/(?P&lt;last_name&gt;[a-zA-Z]+)/(?P&lt;title&gt;[a-zA-Z]+)/$','some_method'),
  </code></pre>