I want to catch some info from a webpage using html agility pack. But the info that I want to use is like this :
Exp1: 22391021 - 09198606027 - 88345027
Exp2: 22252554 - 29458456 - 09365861449
Exp3: chiako.com 09123937651 - 88424554 (4 Line)
And input it to the some parameters with foreach method.
How can I only catch mobile phone with this structure ( 09xxxxxxxxx ) ? Like below examples:
1- 09198606027
2- 09365861449
3- 09123937651
And put it into the parameter(s).
My code:
public void GetingInformarion()
{
string PageLoad = "http://rahnama.com/cat/index/id/38093/%D8%A7%D8%B9%D8%B2%D8%A7%D9%85-%D8%AF%D8%A7%D9%86%D8%B4%D8%AC%D9%88";
HtmlWeb hw = new HtmlWeb();
HtmlAgilityPack.HtmlDocument doc = hw.Load(PageLoad);
HtmlNodeCollection nodes1 = doc.DocumentNode.SelectNodes("//p[@style='margin:0;']/span");
foreach (HtmlNode node in nodes1)
{
string Name = node.InnerText;
}
}