首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

c# 去除html代码 保存<p> 正则式该如何写

2012-03-14 
c# 去除html代码 保存p 正则式该怎么写?c# 去除html代码 保存p 正则式该怎么写?[解决办法]正则:C# cod

c# 去除html代码 保存<p> 正则式该怎么写?
c# 去除html代码 保存<p> 正则式该怎么写?

[解决办法]
正则:

C# code
            string input = @"<html><p>adfadf</p>adf</htmaldfasdjfladfadfasdfa>";            Regex reg = new Regex(@"<p.*?</p>");            foreach(Match m in reg.Matches(input))            Console.WriteLine(m.Value); 

热点排行