title: Remove all instances from string
body: <p>I have a string:</p>
  
  <pre><code>[startstring]hello = guys[endstring] hello guys [startstring]jerk = you[endstring] man this is good!!!
  </code></pre>
  
  <p>I would like remove everything in between <code>[startstring]</code> and <code>[endstring]</code>, all the matches, and also remove the <code>[startstring]</code> and <code>[endstring]</code> from the string. So like the result would be:</p>
  
  <pre><code>hello guys  man this is good!!!
  </code></pre>
  
  <p>and the deleted stuff would be:</p>
  
  <p><strong>[startstring]hello = guys[endstring]</strong> hello guys <strong>[startstring]jerk = you[endstring]</strong> man this is good!!!</p>
  
  <p>See what I mean?</p>
  
  <p>I would like to echo the resulted stuff, without the <code>[startstring]</code> and <code>[endstring]</code> stuff, as shown above. :)</p>
  
  <p>Hope I'm mostly clear. :-)</p>
  
  <p>How would I go about accomplishing this in PHP? Would this envolve some sort of <code>RegEx</code>? Could you provide a sample code?</p>
  
  <p>Thanks so much in advance! :-)</p>
  
  <p><strong>Edit:</strong> Could this code be modified or be used somewhat to complete the task?</p>
  
  <pre><code>preg_match_all('/\[startstring\](.*?)\[endstring\]/s', $input, $matches);
  </code></pre>