title: preg_match to match files with .jpg/.png extension
body: <p>I am having a root folder <code>C:/wamp/www//scanner/scanner/</code>.
  For eg: this folder contains  <strong>directories</strong>  <code>images</code>, <code>work</code>, <code>uploads</code> etc. I am using function <code>scan_dir</code> to scan all the folders and subfolders etc. 
  I want to exclude the files with these extensions.</p>
  
  <pre><code>$except = array("rar", "zip", "mp3", "mp4", "mp3", "mov", "flv", "wmv", "swf", "png", "gif", "jpg", "bmp", "avi");
  </code></pre>
  
  <p>Please can anyone help me.</p>