I have a html page which contains some anchors, I want to collect them into an array. In those anchors, there are some unwanted anchor like . I don't only choose all anchors, but some of them. The html of anchor looks like this:
<a xmlns="" href="exp3dbasics-c-ExpDesktop-ActionBar.htm#exp3dbasics-c-ExpDesktop-ActionBar">Action Bar</a>
The c# code should be:
protected string[] GetHref(string html)
{
Regex regex = new Regex("<anchor>([^<]+)</anchor>", RegexOptions.IgnoreCase | RegexOptions.Multiline);
Match match = regex.Match(html);
if (match.Success)
{
............
}
return ...;
}