title: Regex to match any url in img tag
body: <p>I need a regular expression that can match any url in img src tag</p>
  
  <p>URL can vary from "/images/temp.jpg" or "temp1.jpg" or even "http://www.example.com/temp.jpg?i=123" or anything</p>
  
  <p>I have written following code:</p>
  
  <pre><code>preg_match_all('/(href|src)\s*=\s*"([^\s]+\/\/[^\/]+.\/[^\s]+\.(jpg|jpeg|png|gif|bmp))/ixu'
  </code></pre>
  
  <p>but it's not matching many urls including those with query string like ?i=12345</p>
  
  <p>Anyone have idea how to achieve this?</p>
  
  <p>Thanks</p>