c# 去掉HTML代码

public static string regularExpressionsOfHTML(string TempContent)
  {
   //TempContent = System.Text.RegularExpressions.Regex.Replace(TempContent,"<[^>]+>",""); //任意多个
   TempContent = System.Text.RegularExpressions.Regex.Replace(TempContent,"<[^>]*>",""); //匹配一个
   return TempContent;
  }
posted @ 2007-05-23 10:38 佳文 阅读(217) 评论(0)  编辑 收藏 所属分类: C#网络编程

标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
该文被作者在 2007-11-29 12:48 编辑过


相关链接: