I retrieve the content (html) of a webpage and I store it in a string. I want to parse the string and look for occurencies of a special id. The pages is quite large with plenty of html. The string I'm after can look like this:
/OrderServlet?view=order&orderid=199082')">
I just want the orderid, the number itself. It can be 5 orders or 20 orders in a page. How would you go about this?
Parsing Html
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jan MontanoRank #1,295 · 1.3K reputationPosted Jul 31, 2007, 2:52 AM EDT
You could use String.IndexOf() to search for a particular occurence of a string.
string x = "magnus orderid=5' orderid=6' jan magnus jan orderid=8'";
string lookup = "orderid=";
int lookupIndex = -1;
string delimiter = "'";
int delimiterIndex = -1;
do
{
} while (lookupIndex > 0);
Magnus3 reputationPosted Jul 31, 2007, 5:31 AM EDT