I got the source code of a webpage and I want to get a word after the vi-buybox-watchcount">.
After the vi-buybox-watchcount"> has 152 number. I want to extract it..
I know only split keyword to do it.But i cannot use '>' to split it because that source code has so many '>' with digits..
So i try to split it as following but it is getting errors...
for (int i = 0; i < Convert.ToInt32(idlist.Length); i++)
{
string url = "http://www.ebay.com/itm/" + idlist[i];
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader sr = new StreamReader(response.GetResponseStream());
// richTextBox2.Text += sr.ReadToEnd();
string a = sr.ReadToEnd();
sr.Close();
string source = null;
source = string.Join(Environment.NewLine,
a.Split('vi-buybox-watchcount">') // this is getting errors
.Where(m => m.All(char.IsDigit)));
Please suggest me a method to extract this number