title: How to search a string for a match of "string" from 0000 and 9999
body: <p>I have a string (filename) that may include a frame number. If present, that number should be anywhere from and including 0000 to 9999. I know how to find a match for 0 to 9999. But it specifically need to find a4 digit match.</p>
  
  <p>So this is not how I want it to work...</p>
  
  <pre><code>var fileName = "Ext 01_main Concept A0000"
  
  for (var i = 0; i &lt; 9999; i++){
     if (fileName.indexOf([i]) != -1) {
     var frame = i;
     }
  }
  </code></pre>
  
  <p>In this case, frame needs to be "0000"
  Does any have suggestions?
  Thanks!</p>