当前位置: 移动技术网 > IT编程>开发语言>c# > C#中除去所有在HTML元素中标记

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

2019年07月18日  | 移动技术网IT编程  | 我要评论
/// 除去所有在html元素中标记
  public static string striphtml(string strhtml)
  {
   string stroutput=strhtml;
   regex regex = new regex(@"<[^>]+>|</[^>]+>");
   stroutput = regex.replace(stroutput,"");
   return stroutput;
  }

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网