title: preg_replace() Only Specific Part Of String
body: <p>I always have trouble with regex, I basically have a url, for example:</p>
  
  <p><code>http://somedomain.com/something_here/bla/bla/bla/bla.jpg</code></p>
  
  <p>What I need is a preg_replace() to replace the <code>something_here</code> with an empty string, and leave everything else in tact.</p>
  
  <p>I have tried the following and it replaces the wrong parts:</p>
  
  <pre><code>$image[0] = preg_replace('/http:\/\/(.*)\/(.*)\/wp-content\/uploads\/(.*)/','$2' . '',$image[0]);
  </code></pre>
  
  <p>This ends up leaving only the part I want to replace, rather than actually replacing it!</p>