Asp.net 如何使用正则表达式替换此html

Asp.net 如何使用正则表达式替换此html,asp.net,regex,replace,Asp.net,Regex,Replace,我对regex有点陌生,如果你能帮助我了解如何替换 使用正则表达式将转义字符返回到文本html字符串,我将非常感激。 我尝试使用string.replace,它只替换了代码的某些部分,而不是全部 例如:string.replace(“,”如果您的字符串是HTML编码的,您最好通过Server.HtmlDecode()运行它。这将把它转换回HTML 即 .NET中的String.Replace()替换所有实例。将这些行放在一起并批量替换。 <div class="ExternalClass2

我对regex有点陌生,如果你能帮助我了解如何替换 使用正则表达式将转义字符返回到文本html字符串,我将非常感激。 我尝试使用string.replace,它只替换了代码的某些部分,而不是全部


例如:
string.replace(“,”如果您的字符串是HTML编码的,您最好通过
Server.HtmlDecode()
运行它。这将把它转换回HTML

.NET中的String.Replace()替换所有实例。将这些行放在一起并批量替换。
<div class="ExternalClass2BF55814E98A409296EC90A2605D7D74">
  <div>&ltiframe src=&quot
    <a href=http://player.vimeo.com/video/32001208?portrait=0&ampampbadge=0>
            http://player.vimeo.com/video/32001208?portrait=0&ampampbadge=0
    </a>&quot;
    width=&quot;420&quot; height=&quot;281&quot; frameborder=&quot0&quot 
    webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt&lt/iframe&gt; 
  </div>
</div>
    '' In VB
    Dim myHtml as String = Server.HtmlDecode(YourConcatonatedEncodedHTML)

    // in C#
    string myHtml = Server.HtmlDecode(YourConcatonatedEncodedHTML);