Q:

Exclude  tag from regex not to remove from text?

I have code like this 
string pattern = "<(.|\n)+?>";
System.Text.RegularExpressions.Regex regEx = new System.Text.RegularExpressions.Reg(pattern);
string result = "";
result = regEx.Replace(htmlText, "");

In this "htmlText" will have some html code which also contains break tags. Right now its replacing all the html tags, but I want to leave break tag and replace the rest.
How can  i do it? Anybody have any idea?
Thanks

A:

You could try this one:
<(?!br|/br).+?>

