title: Optional regex groups for comic book titles (python)
body: <p>I am trying to extract relevant information from multiple comic book titles with varying content. However, there are only about 5 or 6 different patterns that are followed:</p>
  
  <p>Examples are:</p>
  
  <blockquote>
    <p>Green Lantern #21</p>
    
    <p>Green Lantern #21 (Variant Cover Edition)</p>
    
    <p>Dejah Thoris &amp; Green Men Of Mars #4 (of 8)</p>
    
    <p>Dejah Thoris &amp; Green Men Of Mars #4 (of 8) (Variant Cover Edition)</p>
    
    <p>Macabre One Shot</p>
    
    <p>Detective Comics #21 Combo Pack</p>
  </blockquote>
  
  <p>I want to capture in groups:</p>
  
  <ol>
  <li>Title (the only REQUIRED group)</li>
  <li>Issue Number</li>
  <li>Total number of issues, e.g. (of 8)</li>
  <li>All other information, e.g. (Varient Cover Edition) or 'Combo Pack'</li>
  </ol>
  
  <p>I have the beginnings of a regex search string started but am having trouble making things reliably optional,</p>
  
  <pre><code>(?P&lt;name&gt;.*?)\s*?(?P&lt;issue_number&gt;#\d*)\s*?(?P&lt;info&gt;.*)
  </code></pre>
  
  <p>It is definitely not complete. Any help anyone could give me would be greatly appreciated.</p>
  
  <p>Thanks in advance!!!</p>