using System;
using System.IO;
using System.Text.RegularExpressions;
namespace ConsoleApplication_C_Sharp
{
static class Program
{
static void Main(string[] args)
{
string htmlText = File.ReadAllText("d:\\index.htm");
Console.WriteLine(GetTitle(htmlText));
}
static string GetTitle(string htmlText)
{
Match m = Regex.Match(htmlText, @"<title>\s*(.+?)\s*</title>");
if (m.Success)
return m.Groups[1].Value;
return "";
}
}
}
/*
run:
Plus 2017
*/