using System.Text.RegularExpressions;
public static void Main()
string pattern = @"(?<=<pre>)(.*?)(?=<\/pre>)";
Regex rg = new Regex(pattern);
string html = "<h1>test</h1> some example text and stuff <pre>This is some text</pre>";
MatchCollection matchedHTML = rg.Matches(html);
Console.WriteLine(matchedHTML[0].Value);