摘要:
protected string[] GetSrc(string str) { string regStr = "\\<IMG\\ [\\s\\S]*?src=['\"]?(?<p>[^'\"\\>\\ ]+)['\"\\>\\ ]"; string cont1 = string.Empty; //图片的src Regex reg = new Regex(regStr, RegexOptions.Compiled | RegexOptions.IgnoreCase); Match match 阅读全文
摘要:
protected string removeHtml(string HTMLStr) { return Regex.Replace(HTMLStr, @"<IMG.*?src=(['""]?)(?<url>[^'"" ]+)(?=\1)[^>]*>", delegate(Match m) { return ""; }); } 阅读全文