title: Sed/RegEx: Removing block of code between two strings from PHP file
body: <p>I've been trying to remove a block of code from a PHP file with sed, that is between these two tags: <strong>//istart</strong> and <strong>//iend</strong>. The code between the tags, and the tags themselves, should be deleted. The idea is to do it recursively, so I can do it for several files.</p>
  
  <p>So, I've got this RegEx: <code>/\/\/istart([\s\S]*?)\/\/iend/</code>.</p>
  
  <p>You can check it working here: <a href="https://regex101.com/r/sQ2bA0/2" rel="nofollow">https://regex101.com/r/sQ2bA0/2</a></p>
  
  <p>However, when I run <em>sed</em> command, nothing happens to the file. I've already tried it in several ways, always without success.</p>
  
  <ul>
  <li><code>sed -i 's/istart([\s\S]*?)\/\/iend//g' test.php</code></li>
  <li><code>sed -i '1s/\/\/istart([\s\S]*?)\/\/iend//' test.php</code></li>
  </ul>
  
  <p>What am I doing wrong?</p>
  
  <p>Appreciate your help, thank you!</p>