Regex rx = new Regex(@"(\d+).\x20target...blank.\x20{1,5}style=.LINE-HEIGHT:150%.>",
            RegexOptions.Compiled | RegexOptions.IgnoreCase);
            MatchCollection _oMatchColl = rx.Matches(weatherhtml);

            string str = string.Empty;
            foreach (Match match in _oMatchColl)
            {
                GroupCollection groups = match.Groups;

                 str = groups[1].ToString();

            }

 

 

推荐一款写正则的软件:RegexTester

相关文章: