asp.net 过滤图片标签的正则


public static string replaceImgUrl(string html)
{
if (html == null)
return “”;

System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(@”\<img[^\>]+\>”, System.Text.RegularExpressions.RegexOptions.IgnoreCase);
html = regex.Replace(html, “”); //过滤frameset
return html;
}

相关文章

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注