DarK Naruto
New Member
I have the following HTML markup:\[code\]<div class="someClass"> <h1>This is the title</h1> <p>Some text</p> <p>Some more text</p></div>\[/code\]I need to strip all the HTML Markup except the \[code\]<p></p>\[/code\] and \[code\]<br />\[/code\] tags, in c# with Regex.I'm using the following regular expression: "<.*?>", but this also removes the tags that I don't want to be deleted. Is there any way to edit the Regex so it will work properly, or should I use something else, like HTML Agility Pack? Thanks.