protected string str = "
sdasasdsdd |
sds
![](https://i-blog.csdnimg.cn/blog_migrate/603f2b6c5431f77e7e60d9978173bd6e.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/603f2b6c5431f77e7e60d9978173bd6e.gif)
protected void Page_Load(object sender, EventArgs e)
{
//string regexstr = @"]*>"; //去除所有的标签
//@"" //去除所有脚本,中间部分也删除
// string regexstr = @"]*>"; //去除图片的正则
// string regexstr = @""; //去除所有标签,只剩br
// string regexstr = @"
"; //去除table里面的所有内容string regexstr = @""; //去除所有标签,只剩img,br,p
str = Regex.Replace(str, regexstr, string.Empty, RegexOptions