using System.Text.RegularExpressions;
public static void Main()
string text = "<p>This is a \"wonderful long text\". \"Another wonderful ong text\"</p> At least it should be. Here we have a <a href=\"http://wwww.site-to-nowhere.com\" target=\"_blank\">link</a>";
Regex rx = new Regex("<.*?>");
string result = rx.Replace(text, new MatchEvaluator(ReplaceLink)).Replace("\"", "&" + "quot;");
Console.WriteLine(result);
static string ReplaceLink(Match m)
return m.ToString().Replace("\"", "'");