title: Deleting text between two strings in php using preg_replace
body: <p>I've been trying to remove a section of text from a string the sites betweem two tags. For example:</p>
  
  <pre><code>This is CROPSTART not very CROPEND cool.
  </code></pre>
  
  <p>...should become this...</p>
  
  <pre><code>This is cool.
  </code></pre>
  
  <p>This is the PHP I've tried and generally it works:</p>
  
  <pre><code>preg_replace('#\/\/CROPSTART[\s\S]+\/\/CROPEND#', '', $string);
  </code></pre>
  
  <p>However, when the string contains multiple "CROPEND" it crops everything from the CROPSTART to the last CROPEND. I would like it to only crop between the first CROPSTART and the <em>first</em> CROPEND.</p>
  
  <p>Anyone know how to do this?</p>
  
  <p>Thanks
  Wonko</p>