1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/// <summary>
/// Gets the HTML links.
/// </summary>
/// <param name="html">The HTML.</param>
/// <returns></returns>
private List<string> GetHtmlLinks(string html)
{
string linkPattern = "<a href=\"(.*?)\">(.*?)</a>";
MatchCollection linkMatches = Regex.Matches(html, linkPattern, RegexOptions.Singleline);
List<string> linkContents = new List<string>();
foreach (Match match in linkMatches)
linkContents.Add(match.Value);
return linkContents;
}
|