日期:2014-05-17 浏览次数:20629 次
string file="<img src="checklistImageUpload/2013112916183147731x.jpg" width="50" /><img src="checklistImageUpload/2013112916184516368x.jpg" width="50" />";
//可能有多个img
string file = "<img src=\"checklistImageUpload/2013112916183147731x.jpg\" width=\"50\" /><img src=\"checklistImageUpload/2013112916184516368x.jpg\" width=\"50\" />";
MatchCollection collection = Regex.Matches(file, @"src=[""
------解决方案--------------------
']([^""
------解决方案--------------------
']*)[""
------解决方案--------------------
']");
foreach (Match match in collection)
{
Console.WriteLine(match.Groups[1].Value);
}