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