读书人

正则表达式替换有关问题.

发布时间: 2012-07-05 07:59:17 作者: rapoo

正则表达式替换问题...
string strContent = "2015款奔驰C级谍照曝光<h1>预计2014年上市</h1>";

请问如何使用正则表达式,把<h1>标签换成<h2>?

[解决办法]

C# code
strContent = Regex.Replace(strContent,@"(?<=@[^:]*?):.{6}(?=\s*?)",string.Empty); 

读书人网 >C#

热点推荐