http://www.soilnet.net/
http://jetadv.cnblogs.com/archive/2006/02/18/333213.html
private void Form1_Load(object sender, EventArgs e)
        {
            WebClient wc = new WebClient();
            byte[] t = wc.DownloadData("http://news.sina.com.cn/china/sz/2006-01-02/index.html");
            string temp = Encoding.Default.GetString(t);
            MatchCollection m = Regex.Matches(temp, @"<A\shref=(?<url>.*(?<date>(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})).*shtml)\s*TARGET=_blank>(?<subject>.*)</a>", RegexOptions.IgnoreCase);
            foreach(Match match in m)
            {
                this.label1.Text = "http://news.sina.com.cn" + match.Groups["url"].Value;
                this.label2.Text = match.Groups["subject"].Value;
                this.label3.Text = match.Groups["date"].Value;
            }

           
        }

        private void button1_Click(object sender, EventArgs e)
        {
            WebClient wc = new WebClient();
            byte[] t1 = wc.DownloadData(this.label1.Text);
            string temp1 = Encoding.Default.GetString(t1);

            this.richTextBox1.Text = temp1;
        }

posted on 2007-12-30 13:12  大口仔  阅读(310)  评论(0)    收藏  举报

使用Live Messenger联系我
关闭