The CSDN function of Regular Expression writing.

Source: Internet
Author: User

When I wrote this, I didn't even see that CSDN already had this function. After writing the code, I suddenly found that it was already in use.

Paste the code here. Although there are a lot of open-source libraries that parse HTML, such as http://htmlagilitypack.codeplex.com/, I always agree with them.

:

Haha, at least let's see @--#

   button1_Click(               (!                   url =                  htmlSource =                  htmlSource =                  pageCount =                  context =                    (pageCount >                        ( i = ; i <= pageCount; i++                          htmlSource = GetHtmlSource(url +  +                         context+=                                         context +=                   richTextBox1.Text =                                 MessageBox.Show(                                                               GetHtmlSource(              WebClient client =              client.Headers.Add(,              Stream data =              result =               (StreamReader reader =                   result =                                                                   GetPageCount(               pageCount =               Regex reg =  Regex(, RegexOptions.Singleline |              htmlSource =             Regex reg1 =  Regex(, RegexOptions.Singleline |              count = reg1.Matches(reg.Match(htmlSource).Groups[              .TryParse(reg1.Matches(reg.Match(htmlSource).Groups[].Value)[count - ].Groups[                                                                                                      GetArticleTitle(               title =               Regex reg =  Regex(, RegexOptions.Singleline |              title = reg.Match(HtmlSource).Groups[                            GetAuthorName(               result =               Regex regex =  Regex(              result = regex.Match(HtmlSource).Groups[                           GetLZArticle(                result =               authorName =              Regex regex =  Regex( + authorName + , RegexOptions.Singleline |               ( i = ; i < regex.Matches(HtmlSource).Count; i++                  result += regex.Matches(HtmlSource)[i].Groups[                 result +=                result.Trim().Replace(,         }

The code is here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.