title: RegEx not capturing
body: <p>I am trying (unsuccessfully) to extract out some information using RegEx but I cannot understand why one certain element is not capturing in the correct group.</p>
  
  <p>Here's the expression</p>
  
  <pre><code>^[\\* ](?'sname'[A-Z]+)/(?'fname'[A-Z]+) (\\*(?'chdinf'(INF|CHD)))? (?'random'.+?) (?'cpn'CPN[\\* ][1234])(?'status'.+?) (?'tktno'[0-9]+)$
  </code></pre>
  
  <p>And here's a sample input</p>
  
  <pre><code>*SNAME/FNAME         *INF   CPN 2   XX XXXX      99999999999999
  </code></pre>
  
  <p>The <code>*INF</code> text should be captured in the <code>chdinf</code> group but it's not but instead is being captured by the <code>random</code> group.</p>
  
  <p>The <code>*INF</code> text is optional information hence the <code>lazy ?</code> at the end of the grouping construct.</p>
  
  <p>If I change the <code>random</code> construct to <code>(?'random' +?)</code> (space, rather than '.') then the Regex fails entirely.</p>
  
  <p>PS: I've been using <a href="http://regexstorm.net/tester" rel="nofollow">http://regexstorm.net/tester</a> as a testing platform.</p>