解决方案 »

  1.   

    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                string HTML = "<meta name=\"keywords\" content=\"淘宝,掏宝,网上购物,店铺, 冲钻2014电脑壁纸挂历壁纸模板設計海報推广素材包邮 设计素材/源文件,个性定制/设计服务/DIY.\" />\r\n <meta name=\"data-spm\" content=\"2013\" />\r\n <meta name=\"microscope-data\" content=\"pageId=;prototypeId=2;siteId=4; shopId=104537991; userid=822848658;\">\r\n   <title>冲钻2014电脑邮-淘宝网</title>\r\n ";
                Match mc = Regex.Match(HTML, @"(?is)<title>(?<title>.*?)</title>");
                Console.WriteLine(mc.Groups["title"].Value);//冲钻2014电脑邮-淘宝网
            }
        }
    }
      

  2.   


         title = Regex.Match(html, @"<title>(.*?)</title>").Result("$1")