title: Parsing srt subtitles
body: <p>I want to parse srt subtitles:</p>
  
  <pre><code>    1
      00:00:12,815 --&gt; 00:00:14,509
      Chlapi, jak to jde s
      těma pracovníma světlama?.
  
      2
      00:00:14,815 --&gt; 00:00:16,498
      Trochu je zesilujeme.
  
      3
      00:00:16,934 --&gt; 00:00:17,814
      Jo, sleduj.
  </code></pre>
  
  <p>Every item into structure. With this regexs:</p>
  
  <p>A:</p>
  
  <pre><code>RE_ITEM = re.compile(r'(?P&lt;index&gt;\d+).'
      r'(?P&lt;start&gt;\d{2}:\d{2}:\d{2},\d{3}) --&gt; '
      r'(?P&lt;end&gt;\d{2}:\d{2}:\d{2},\d{3}).'
      r'(?P&lt;text&gt;.*?)', re.DOTALL)
  </code></pre>
  
  <p>B:</p>
  
  <pre><code>RE_ITEM = re.compile(r'(?P&lt;index&gt;\d+).'
      r'(?P&lt;start&gt;\d{2}:\d{2}:\d{2},\d{3}) --&gt; '
      r'(?P&lt;end&gt;\d{2}:\d{2}:\d{2},\d{3}).'
      r'(?P&lt;text&gt;.*)', re.DOTALL)
  </code></pre>
  
  <p>And this code:</p>
  
  <pre><code>    for i in Subtitles.RE_ITEM.finditer(text):
      result.append((i.group('index'), i.group('start'), 
               i.group('end'), i.group('text')))
  </code></pre>
  
  <p>With code B I have only one item in array (because of greedy .*) and with code A I have empty <em>'text'</em> because of no-greedy .*?</p>
  
  <p>How to cure this?</p>
  
  <p>Thanks</p>