title: Regex sometimes doesn't work as expected
body: <p>I'm parsing TrackMania's .Gbx replay files. It's mixed with bytecode and XML  header part that I'm interested in. I'm trying to extract that part from replay file. For most replays it works just fine. But I encountered specific replay that breaks regex.</p>
  
  <pre><code>import re
  
  string = r'''
  &lt;header type="replay" exever="3.3.0" exebuild="2018-02-09_15_48" 
  title="TMStadium"&gt;&lt;map uid="Y48WnfHlw9SkYptpMIVkd0PUpRm" 
  name="$fffTM$09FProLeague$fff xtasis -$09F GWF$fff2018
  " author="w_1r" authorzone="World|Europe|Netherlands|Gelderland"/&gt;&lt;desc 
  envir="Stadium" mood="Day" maptype="TrackMania\Race"
  mapstyle="" displaycost="2149" mod="" /&gt;&lt;playermodel id="StadiumCar"/&gt;&lt;times 
  best="92373" respawns="1" stuntscore="7"
  validable="1"/&gt;&lt;checkpoints cur="13" onelap="13"/&gt;&lt;/header&gt;
  '''
  header = r'(&lt;header)(.*)(&lt;/header&gt;)'
  print(re.findall(header, string))
  </code></pre>
  
  <p>Other parts of file seems like don't matter, since even with hand copied header part, regex doesn't work. </p>
  
  <p>Could anyone help to find what I'm missing?</p>