using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"<tag-1>.*?</tag-1>";
string substitution = @"";
string input = @"<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>";
RegexOptions options = RegexOptions.Singleline;
Regex regex = new Regex(pattern, options);
string result = regex.Replace(input, substitution);
}
}
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 C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx