Question: I am trying to grab data from a webpage. I have downloaded the webpage into a string variable.

I am wondering how I can grab the value between two tags. I have included a snippet of the downloaded string and the value I want is `895`

```html
<div class="split2r right">

                    <strong>Avg. asking rent in M4:</strong> 
                    <strong class="price big">&pound;897 pcm</strong><br>
                    <strong>No. of properties to rent in M4:</strong> <strong><a data-ga-category="Area stats" data-ga-action="properties_to_rent" data-ga-label="/tracking/home-values/results/" href="/to-rent/property/manchester/isaac-way/m4-7ed/">225</a></strong>

            </div>

```

A code example would be great.

Answer: 
This is actually quite easy using the [HtmlAgilityPack library](http://htmlagilitypack.codeplex.com/) to parse the HTML.

The first step is to add a reference to the `HtmlAgilityPack` library. Then you can start parsing the HTML:

```
const string Html = "<strong>Avg. price:</strong> <strong class=\"price big\">&pound;895 pcm</strong><br><strong>this is the price of zed headphones</strong>";

var doc = new HtmlDocument();
doc.LoadHtml(Html);

```

The next step is to find the element you are looking for, in this case that is the `<strong>` element with its `class` set to `price big`:

```
var priceNode = doc.DocumentNode.SelectSingleNode("//strong[@class='price big']");

```

Now our final step is to retrieve the actual number from the node's `InnerText` property. Probably the best way to do this is through a regular expression, which can be quite simple if we assume that the required number is the only number in the inner text of the node:

```
var priceMatch = Regex.Match(priceNode.InnerText, @"(\d+)");

Console.WriteLine(priceMatch); // Will output 895

```
Assuming your string value is called "source" and all extracts are formatted as the example

```
var value = Regex.Replace(source, @"\D", string.Empty);

```