正则匹配代码

作者:互联网   出处:控件中国网   2014-11-05 19:05:48   阅读:1

正则匹配代码

            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();

            }

 

Copyright© 2006-2015 ComponentCN.com all rights reserved.重庆磐岩科技有限公司(控件中国网) 版权所有 渝ICP备12000264号 法律顾问:元炳律师事务所
客服软件
live chat