/// <summary>
/// 正则图片路径
/// </summary>
/// <returns></returns>
public static StringBuilder GetImgUrl(string text)
{
StringBuilder str = new StringBuilder();
string pat = @"<img\s+[^>]*\s*src\s*=\s*([']?)(?<url>\S+)'?[^>]*>";
Regex r = new Regex(pat, RegexOptions.Compiled);
Match m = r.Match(text.ToLower());
//int matchCount = 0;
while (m.Success)
{
Group g = m.Groups[2];
str.Append(g).Append(",");
m = m.NextMatch();
}
return str.Replace("\"", "");
}