title: PHP regex to get filename from URL
body: <p>I'm not too good with regular expressions, but how would I go about splitting the filename with the extension from the path?</p>
  <blockquote>
  <p>D:/DCIM/image10.jpg</p>
  <p>D:/DCIM/image11.jpg</p>
  <p>D:/DCIM/image12.jpg</p>
  <p>D:/DCIM/image13.jpg</p>
  </blockquote>
  <p>I would get imagex.jpg from each other the about strings, x being a number.</p>
  <p>So basically search for &quot;.jpg&quot; then get all other characters up until the &quot;/&quot;.</p>
  <p><strong>Edit:</strong>
  Ah the pathinfo function will do the job, although it would be nice to know how to do things like this with a RegEx for future purposes.</p>