I have a Automation Suite, currently testing against Wordpress (a test site to practice against). I am attempting to verify when a user edit's an existing Page they are taken to the correct screen. Previously the following code snippet was working fine, however now the ID mentioned below is no longer present (it was an image). 

```
public static bool IsInEditMode()
{
   return Driver.Instance.FindElement(By.Id("icon-edit-pages")) != null;
}

Assert.AreEqual(NewPostPage.IsInEditMode(), "You are not in edit mode");

```

The HTML I am targeting is...

```
<h2>
Edit Page 
<a href="http://localhost/wordpress/wp-admin/post-new.php?post_type=page" class="add-new-h2">Add New</a>
</h2>

```

I would like to extract the value of the h2 tag 'Edit Page'. Currently I am also getting the value of the anchor 'Add New', which I need to ignore.

using a CssSelector with "h2:first-child" returns both values. 

I think I need to use a regular expression, if anyone has any suggestions to help that would be great. 

I attempted doing something similar in JSFiddle but require the C# equivalent

```
var myString = document.getElementsByTagName('h2')[0].innerHTML;
var newString = myString.replace(/<([^>]+?)([^>]*?)>(.*?)<\/\1>/ig, "");
console.log(newString);

```