软件编程
位置:首页>> 软件编程>> C#编程>> C#中除去所有在HTML元素中标记

C#中除去所有在HTML元素中标记

  发布时间:2023-04-14 04:09:56 

标签:C#中除去所有在HTML元素中标记

/// 除去所有在HTML元素中标记
  public static string StripHTML(string strHtml)
  {
   string strOutput=strHtml;
   Regex regex = new Regex(@"<[^>]+>|</[^>]+>");
   strOutput = regex.Replace(strOutput,"");
   return strOutput;
  }

0
投稿

猜你喜欢

手机版 软件编程 asp之家 www.aspxhome.com