title: How to extract and format specific values from a string
body: <p>We have files uploaded to our server in a specific format that indicates a version and build date, ex: <strong>5_5_61__20180828.dav</strong></p>
  
  <p>The first group of numbers represents the version <code>5_5_61</code>, and the last group of numbers represents the build date <code>20180828</code> and then <code>.dav</code> is just the file extension.</p>
  
  <p>How would we be able to extract and format this file name to appear like this:</p>
  
  <pre><code>Version: 5.5.61 Build Date: 08/28/2018
  </code></pre>
  
  <p>I've been trying different variations of this snippet of code but can't seem to figure out the proper method:</p>
  
  <pre><code>$file = '5_5_61__20180828.dav';
  echo substr($file, strpos($file , "_") + 1);
  </code></pre>
  
  <p>I should note that I am willing to change the file names if there's an easier way to achieve the final result using a different naming convention for the files.</p>