title: GlobIterator RegEx
body: <p>I have a string with a wildcard at the end, but I don't know how many characters that string will be. How can I use GlobIterator and RegexIterator to match similar file names? The second match returns all the files from a directory, but I don't want that. I need a proper regular expression. I don't want to match the last set before the extension (ex. the files sized 250M, 500M, etc.)</p>
  <pre><code>$iterator = new GlobIterator($this-&gt;srcDir . $identifier . &quot;.*&quot;);
  </code></pre>
  <p><strong>MATCH ON</strong></p>
  <pre><code>/var/www/import/2014047-0216/YukonGold.A2014047.1620.721.*
  </code></pre>
  <p>This returns the correct files.</p>
  <pre><code>/var/www/import/2014047-0216/YukonGold.A2014047.1620.721.250m.jpg
  /var/www/import/2014047-0216/YukonGold.A2014047.1620.721.500m.jpg
  </code></pre>
  <p><strong>MATCH ON</strong></p>
  <pre><code>/var/www/import/2014047-0216/YukonGold.A2014047.1620.*
  </code></pre>
  <p>Returns the files:</p>
  <pre><code>/var/www/import/2014047-0216/YukonGold.A2014047.1620.250m.jpg
  /var/www/import/2014047-0216/YukonGold.A2014047.1620.500m.jpg
  /var/www/import/2014047-0216/YukonGold.A2014047.1620.721.250m.jpg
  /var/www/import/2014047-0216/YukonGold.A2014047.1620.721.500m.jpg
  </code></pre>
  <p><strong>EXPECTED OUTPUT</strong></p>
  <p>/var/www/import/2014047-0216/YukonGold.A2014047.1620.721.*</p>
  <pre><code>/var/www/import/2014047-0216/YukonGold.A2014047.1620.721.250m.jpg
  /var/www/import/2014047-0216/YukonGold.A2014047.1620.721.500m.jpg
  </code></pre>
  <p>/var/www/import/2014047-0216/YukonGold.A2014047.1620.*</p>
  <pre><code>/var/www/import/2014047-0216/YukonGold.A2014047.1620.250m.jpg
  /var/www/import/2014047-0216/YukonGold.A2014047.1620.500m.jpg
  </code></pre>