string s = "![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/dot.gif)
..";
Regex re = new Regex(@"<a[^>]*href=(""(?<href>[^""]*)""|'(?<href>[^']*)'|(?<href>[^\s>]*))[^>]*>(?<text>.*?)</a>", RegexOptions.IgnoreCase | RegexOptions.Singleline);
Match m = re.Match(s);
if(m.Success)
{
string link = m.Groups["href"].Value;
string text = Regex.Replace(m.Groups["text"].Value,"<[^>]*>","");
Console.WriteLine("link:{0}\ntext:{1}", link, text);
}
![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/dot.gif)
Regex re = new Regex(@"<a[^>]*href=(""(?<href>[^""]*)""|'(?<href>[^']*)'|(?<href>[^\s>]*))[^>]*>(?<text>.*?)</a>", RegexOptions.IgnoreCase | RegexOptions.Singleline);
Match m = re.Match(s);
if(m.Success)
{
string link = m.Groups["href"].Value;
string text = Regex.Replace(m.Groups["text"].Value,"<[^>]*>","");
Console.WriteLine("link:{0}\ntext:{1}", link, text);
}