去除img标签
protected string removeHtml(string HTMLStr)
{
return Regex.Replace(HTMLStr, @"<IMG.*?src=(['""]?)(?<url>[^'"" ]+)(?=\1)[^>]*>", delegate(Match m) { return ""; });
}
{
return Regex.Replace(HTMLStr, @"<IMG.*?src=(['""]?)(?<url>[^'"" ]+)(?=\1)[^>]*>", delegate(Match m) { return ""; });
}