title: How to extract only part of string in PHP?
body: <p>I have a following string and I want to extract image123.jpg.</p>
  
  <pre><code>..here_can_be_any_length "and_here_any_length/image123.jpg" and_here_also_any_length
  </code></pre>
  
  <p>image123 can be any length (newimage123456 etc) and with extension of jpg, jpeg, gif or png.</p>
  
  <p>I assume I need to use <a href="http://php.net/manual/en/function.preg-match.php" rel="nofollow noreferrer">preg_match</a>, but I am not really sure and like to know how to code it or if there are any other ways or function I can use.</p>