title: php preg_match matching wrong subjects?
body: <p>I really don't understand why, but PHP preg_match is matching wrong subjects in certain ones.</p>
  
  <p>For instance, in this 4 lines, i expect to get "match 2" as output, but i get all as matched instead (match 1 through 4)</p>
  
  <pre><code>if (preg_match("/.bin|.d64|.dcr|.gb|.gbc|.htm|.html|.nes|.prg|.sna|.swf|.z80/i", 'arnesdemanoTh.php'))
  echo 'match 1';
  
  if (preg_match("/.bin|.d64|.dcr|.gb|.gbc|.htm|.html|.nes|.prg|.sna|.swf|.z80/i", 'arnesdemanoTh.swf'))
  echo 'match 2';
  
  if (preg_match("/.bin|.d64|.dcr|.gb|.gbc|.htm|.html|.nes|.prg|.sna|.swf|.z80/i", 'arnesdemanoTh1.gif'))
  echo 'match 3';
  
  if (preg_match("/.bin|.d64|.dcr|.gb|.gbc|.htm|.html|.nes|.prg|.sna|.swf|.z80/i", 'arnesdemanoTh2.gif'))
  echo 'match 4';
  </code></pre>
  
  <p>In this case, i get "match 2" as output, just as expected</p>
  
  <pre><code>if (preg_match("/.bin|.d64|.dcr|.gb|.gbc|.htm|.html|.nes|.prg|.sna|.swf|.z80/i", 'bang.php'))
  echo 'match 1';
  
  if (preg_match("/.bin|.d64|.dcr|.gb|.gbc|.htm|.html|.nes|.prg|.sna|.swf|.z80/i", 'bang.swf'))
  echo 'match 2';
  
  if (preg_match("/.bin|.d64|.dcr|.gb|.gbc|.htm|.html|.nes|.prg|.sna|.swf|.z80/i", 'bang1.gif'))
  echo 'match 3';
  
  if (preg_match("/.bin|.d64|.dcr|.gb|.gbc|.htm|.html|.nes|.prg|.sna|.swf|.z80/i", 'bang2.gif'))
  echo 'match 4';
  </code></pre>
  
  <p>What i'm doing wrong?</p>
  
  <p>Thanks a lot in advise!</p>