以下是网页源码:
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>济南天气预报-今日_明日_一周天气预报:15日星期六  晴  20/12℃  </title><meta http-equiv='X-UA-Compatible' content='IE=7' /><meta http-equiv="Content-Language" content="zh-cn">
另外,请老大说说怎么学习正则表达式?总是感觉没弄懂

解决方案 »

  1.   

    (?is)<title>([^<]+?)</title>取$1学习正则,就要多看,多写。没有什么捷径。
      

  2.   

    (?is)<title>([^<]+?)</title>取$1学习正则就要多看,多写,没有什么捷径。
      

  3.   

    (?is)<title>([^<]+?)</title>取$1学习正则就要多看,多写,没有什么捷径。
      

  4.   

    获得title吗?
                string str = @"<html xmlns=""http://www.w3.org/1999/xhtml""><head><meta http-equiv=""Content-Type"" content=""text/html; charset=UTF-8"" /><title>济南天气预报-今日_明日_一周天气预报:15日星期六  晴  20/12℃  </title><meta http-equiv='X-UA-Compatible' content='IE=7' /><meta http-equiv=""Content-Language"" content=""zh-cn"">";
                Regex reg = new Regex(@"(?is)(?<=<title>)(?:(?!</title).)*");
                Console.WriteLine(reg.Match(str).Value);
      

  5.   

    取title?
                string str = @"<html xmlns=""http://www.w3.org/1999/xhtml""><head><meta http-equiv=""Content-Type"" content=""text/html; charset=UTF-8"" /><title>济南天气预报-今日_明日_一周天气预报:15日星期六  晴  20/12℃  </title><meta http-equiv='X-UA-Compatible' content='IE=7' /><meta http-equiv=""Content-Language"" content=""zh-cn"">";
                Regex reg = new Regex(@"(?is)(?<=<title>)(?:(?!</title).)*");
                Console.WriteLine(reg.Match(str).Value);