1#
参考:http://zhidao.baidu.com/link?url=wq3PcwIjk_AM_Yx3Mbbe7RVviLec9513huPKP7bM6NOd0t1zDQIPG7Sj0mulWc07FOoZT951ZD3kX2jmBZCy2q

举例如果想匹配

中的文字则表达式为:
  1. [quote]var regexDesc = new Regex(@"<和谐p.*?>(.*?)<和谐/p>", op);[/quote]

复制代码
操作时:
  1. Match matchDesc = regexDesc.Match(newsItem.Description);



  2.                     if (matchDesc.Success)

  3.                     {

  4.                         while (matchDesc.Success)

  5.                         {

  6.                             newsItem.Description = newsItem.Description.Replace(matchDesc.Value, "");

  7.                             matchDesc = matchDesc.NextMatch();

  8.                         }

  9.                     }

复制代码