1. 程式人生 > >C#去掉字串中的標籤

C#去掉字串中的標籤

   Regex reg = new Regex(@"(?is)(?<=<P>).*?(?=</P>)", RegexOptions.IgnoreCase);
   string content = reg.Match("此處傳字串值").Value;