string regularExpresion = "<[^<>]*>";
string body = "<html>this<br />is<br />a<br />test</html>";
Regex regex = new Regex(regularExpresion, RegexOptions.IgnoreCase | RegexOptions.Multiline);
string bodyNoHTML = regex.Replace(body, "").Trim();
Input:
<html>1<br />2<br />2<br />4</html>
Output:
1234
1 comment:
Greeat job!!! I just used this very successfully. thanks
Post a Comment