日期:2014-05-18 浏览次数:21056 次
Regex re = new Regex(@"<strong>Language:[\s\S]*?</strong>([\s\S]*?)</p>", RegexOptions.IgnoreCase); MatchCollection matches = re.Matches(str); foreach(Match match in matches) { Console.WriteLine(match.Groups[1].Value); }
------解决方案--------------------
string s = @"<br /><strong>Language: </strong>中间是我想要的东西</p></td></tr>"; Match match = Regex.Match(s, @"(?is)<strong>.*?</strong>(.+?)</p></td>"); Response.Write(match.Groups[1].Value);