Comment detail

LL Golf Hole 1 - tinyurl.comを使ってURLを短縮する (Nested Flatten)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
using System;
using System.Net;
using System.Text.RegularExpressions;

class Program
{
    static void Main(string[] args)
    {
        string url = "http://tinyurl.com/create.php?url=" + args[0];
        WebClient wc = new WebClient();
        string r = wc.DownloadString(url);
        MatchCollection mc = Regex.Matches(r, "<blockquote><b>([^<]+)</b>");
        Console.WriteLine(mc[1].Groups[1].Value);
    }
}

Index

Feed

Other

Link

Pathtraq

loading...