【发布时间】:2009-02-22 19:03:41
【问题描述】:
public class MyExample
{
public static void Main(String[] args)
{
string input = "<a href=\"http://tvrss.net/search/?show_name=The+Venture+Bros&show_name_exact=true\">The Venture Bros</a></p></li>";
// Call Regex.Match
Match m = Regex.Match(input, "/show_name=(.*?)&show_name_exact=true\">(.*?)</i");
// Check Match instance
if (m.Success)
{
// Get Group value
string key = m.Groups[1].Value;
Console.WriteLine(key);
// alternate-1
}
}
我想要“The Venture Bros”作为输出(在本例中)。
【问题讨论】: