I'm trying to get all the links from a web page. So far I have the page source stored in a string. I have done similar things like this in Java, using a string tokenizer. I've looked around trying to find something like this for C# but apparently it doesn't have this function. What would be the best way about going about this? I've found a split string method using delimiters, but that doesn't look very efficient. Any advice?

you are correct, String.split is the way to go to treat it the same as the tokenizer

the other way would be to use regex

regex is the easiest way to split it, theres many examples on how to split up html using regex out there.

Thanks. I just just found a way to get the links really easy.

private void toolStripButtonLinks_Click(object sender, EventArgs e)
            foreach(HtmlElement link in webBrowser1.Document.Links)

Now I just have to figure out how to check the links by getting the 220 response.

This question has already been answered. Start a new discussion instead.