title: preg_replace syntax (img src) and keeping part of the URL
body: <p>I am trying to do something similar to <a href="https://stackoverflow.com/questions/11052948/preg-replace-syntax-img-src">preg_replace syntax (img src)</a> but I don't want to take away everything in the SRC attribute.</p>
  
  <pre><code>src="http://www.bob.com/co/02/wp-content/uploads/2014/07/david_hasselhoff_at_the_dome_5.jpg"
  </code></pre>
  
  <p>I just want to replace the <strong><code>http://www0.bob.com/co/02/</code></strong>. It can vary.</p>
  
  <p>So what I am trying to do is to replace what is between <code>src="</code> to <code>/wp-content/</code> in a image tag.</p>
  
  <p>How can I go about this?</p>
  
  <p>Here is the code I tried:</p>
  
  <pre><code>$content = preg_replace('!(?&lt;=src\=\").+(?=\"(\s|\/\&gt;))!', 'http://alex.com/wp-content/', $content); 
  </code></pre>