title: Other way to get folder whose name follows a pattern in php
body: <p>My OS environment is linux.</p>
  
  <p>I have a php file in this folder - /var/www/html (say... test.php)</p>
  
  <p>I also have a folder called DATA_SOMENUMBERHERE in the same directory.</p>
  
  <p>Inside test.php, I need to find out the SOMENUMBEREHERE.</p>
  
  <p>In other words, find the folder whose name starts with DATA_ and get the remainder part
  of the string.</p>
  
  <p>One way to do it is, get all folder names in that directory and loop through them and find out.</p>
  
  <p>But is there another way? Can I pass some kind of regexp to some file system function call so that I get all folder names matching that pattern?</p>
  
  <p>A single function call will be ideal. But if none are available, I am okay with looping through.</p>
  
  <p><strong>Safe Assumptions:</strong></p>
  
  <ul>
  <li><p>There will always be a folder that
  starts with DATA_</p></li>
  <li><p>There will be only one folder that
  starts with DATA_</p></li>
  <li><p>SOMENUMBERHERE will keep changing.</p></li>
  </ul>