Q:

Any ideas why this does not work? C#

public class MyExample
{

    public static void Main(String[] args)
    {

string input = "<a href=\"http://tvrss.net/search/?show_name=The+Venture+Bros&amp;show_name_exact=true\">The Venture Bros</a></p></li>";

    // Call Regex.Match
    Match m = Regex.Match(input, "/show_name=(.*?)&amp;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
    }

    }

I want "The Venture Bros" as output (in this example).

A:

try this : 
string input = "<a href=\"http://tvrss.net/search/?show_name=The+Venture+Bros&amp;show_name_exact=true\">The Venture Bros</a></p></li>";

// Call Regex.Match
Match m = Regex.Match(input, "show_name=(.*?)&amp;show_name_exact=true\">(.*?)</a");

// Check Match instance
if (m.Success)
{
    // Get Group value
    string key = m.Groups[2].Value;
    Console.WriteLine(key);
    // alternate-1
}

