62,046
社区成员
发帖
与我相关
我的任务
分享
string content = @"<img [这里面的内容不确定] src=""a.gif""> ";
Regex reg = new Regex(@"(?is)(<img[^>]+src="")([^""]+)("")");
Match m = reg.Match(content);
content = reg.Replace(content, "$1image/$2$3");
MessageBox.Show(content);
string URL = "<img[^>]*src=(\"|')(?<src>[^(\"|')]*)(\"|')[^>]*>";
MatchCollection MC = new Regex(URL, RegexOptions.IgnoreCase).Matches(strHTML);
List<string> arrOutPut = new List<string>();
foreach (Match m in MC)
{
arrOutPut.Add(m.Groups["src"].Value);
}