string reg = @"<a[^>]*href=([""‘])?(?<href>[^‘""]+)\1[^>]*>"; MatchCollection matches = Regex.Matches(content, reg, RegexOptions.IgnoreCase); foreach (Match item in matches) { var href= item.Groups[1].Value; }
原文地址:http://blog.csdn.net/chinaplan/article/details/24801137