Ask for php regular expressions to replace the first part of the image address

Source: Internet
Author: User
How to use php regular expressions to set the image address im1274.taobaocdn. comba ...!! Replace 0-item_pic.jpg_230x230.jpg with img. alicdn. combaoup ...!! 0-item_pic.jpg_230x230.jpgimg04 after the 04 number is changed is img... how php regular put picture address http://img04.taobaocdn.com/ba ...!! 0-item_pic.jpg_230x230.jpg replace with https://img.alicdn.com/bao/up ...!! 0-item_pic.jpg_230x230.jpg

The 04 numbers after img04 will change.

That is, replacing http: // img0 * .taobaocdn.com/With a https://img.alicdn.com/

I tried some methods to replace them either not all or not.

This is also incomplete

Reply content:

How php regular put the picture address http://img04.taobaocdn.com/ba ...!! 0-item_pic.jpg_230x230.jpg replace with https://img.alicdn.com/bao/up ...!! 0-item_pic.jpg_230x230.jpg

The 04 numbers after img04 will change.

That is, replacing http: // img0 * .taobaocdn.com/With a https://img.alicdn.com/

I tried some methods to replace them either not all or not.

This is also incomplete

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.