How can I use regular expression matching for this code?

Source: Internet
Author: User
How can I use regular expressions to match php regular expressions in this code?

  •  

  • Reply to discussion (solution)

    What does it match? All or part? What are the rules? A detailed description.

    W

    What does it match? All or part? What are the rules? A detailed description. I use curl to capture a webpage and want to match the name value in this section.

    Do you have any special rules? you can paste more code.

    Match the tag id = "onlickImg"

    Do you have any special rules? you can paste more code.
    This is code to capture the content of the webpage and then get the product image of the website.

    $ Ch = curl_init (); curl_setopt ($ ch, CURLOPT_URL, "http://item.vt.vancl.com/0194233.html"); curl_setopt ($ ch, CURLOPT_TIMEOUT, 30); curl_setopt ($ ch, CURLOPT_USERAGENT, _ USERAGENT _); curl_setopt ($ ch, CURLOPT_REFERER, _ REFERER _); curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1); $ content = curl_exec ($ ch ); curl_close ($ ch); preg_match ("regular", $ content, $ img)

    Then I want to get the product pictures on the webpage. after half a day, I can't match the product pictures.

    Match the tag id = "onlickImg"

    I wrote a match id = "onlickImg", and then I always cannot match the name value.

    Preg_match_all ('/

    Preg_match_all ('/thank you for your help

    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.