Finding a regular solution for a piece of code

Source: Internet
Author: User
Finding the regular of a piece of code
These 2 pieces of code is in HTML, the HTML is downloaded through file_get_contents to extract the data, Web address: http://rate.taobao.com/user-rate-39512.htm

To get the most recent half-and half-year reviews (positive, negative, and bad), the sample code is as follows

I want to match these two characters at once, how to write the regular


4508530



289048

Tips:
First: class= "J_makepoint" data-point-val= "tbrate.2.5.1" >4508530
The second one: class= "j_show_list j_makepoint" data-point-val= "tbrate.2.4.1" data-param= ' timeline=-210&result=1 ' > 289048


are required to extract the numbers within the tag, such as the first one in 4508530 and the second in 289048, with a regular match

------Solution--------------------
Three of the same stickers? class matches as long as it contains j_makepoint?



------Solution--------------------
PHP Code
  
  /U ", $data, $contents); Echo ' first piece of data: '. $contents [3][0]. '
'; Echo ' The second piece of data: '. $contents [3][1]. '
'; Echo ' third piece of data: '. $contents [3][2]. '
';? >
  • 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.