title: loading files (with regular expressions) in JS
body: <p>I have a bunch of images foldered like this:</p>
  
  <pre><code>/first/345.jpg
  /second/12.jpg
  /third/394.jpg
  /fourth/234.jpg
  /fifth/5.jpg
  </code></pre>
  
  <p>I'm trying to go through the folders and load the image contained. There is only one image in each folder. How can i tell javascript to simply choose the image, regardless of name?</p>
  
  <p>Look at this code:</p>
  
  <pre><code>for (var i=0; i&lt;dirlist.length; i++) { // dirlist is an array containing folder names 
      something.load.image("C:/.../"+ dirlist[i] +"/"+ anyDigit + ".png");
  }
  </code></pre>
  
  <p>How can i replace the "anyDigit" to make it work? Regular expressions? Thank you!</p>