I am trying to remove some tags with content while loading a page to restrict not sending few tags.
I was doing with search string and its not helpful for larger data set.
string startTag = "<section>"+Environment.NewLine+
" <div id=\"nonPrintable123\">";
var startIndex = htmlString.IndexOf(startTag);
var html = htmlString.Substring(0, startIndex) + "</div></form> </body></html>";
Is there any way so I could use Regex and remove /replace a whole div- child with empty string?
The Data within <Section> {data} </Section>
should be replaced with empty or any other suppression.