# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/<tag-1>.*?<\/tag-1>//gs;t' <<< "<p>You will find below reports for customer <b>[CustomerName]</b> dated <b>[ReportdDate]</b></p>
<tag-1>
<h3>Title1</h3>
<table>
<thead id=\"t01\">
<tr>
<th align='center' width='80'>Order Nr</th>
<th align='left' width='400'>Planning date</th>
<th align='left' width='200'>Info</th>
<th align='center' width='200'>Site Name</th>
</tr>
</thead>
<tbody>
[TableTodo]
</tbody>
</table>
</tag-1>
<tag-2>
<h3>Title2</h3>
<table>
<thead id=\"t01\">
<tr>
<th align='center' width='80'>Order Nr</th>
<th align='left' width='100'>Date</th>
<th align='left' width='400'>Info</th>
<th align='center' width='200'>Site Name</th>
</tr>
</thead>
<tbody>
[TableTodo]
</tbody>
</table>
</tag-2>"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html