I need to search for a specific string in a file and remove the all the lines in the file until i reach a specific string again. Basically i need to remove all the lines between two specific string.
e.g
<start /myhome >
some entries
some entries
<end>
<start ~ "/myhome[^/]+" >
some entries
some entries
<end>
<start /newhome >
some entries
some entries
another entry
different string
<end>
<start ~ "/myhome[^/]+" >
some entries
some entries
<end>
Expected output should be:
<start /myhome >
some entries
some entries
<end>
<start /newhome >
some entries
some entries
another entry
different string
<end>