How to use PHP regular to replace the image address http://img04.taobaocdn.com/ba...!!0-item_pic.jpg_230x230.jpg with https://img.alicdn.com/bao/up...!! 0-item_pic.jpg_230x230.jpg
img04 The 04 number behind it will change
That is, replace http://img0*.taobaocdn.com/ with https://img.alicdn.com/
I tried some methods, but either all of them were replaced or they couldn’t be replaced normally
=preg_replace('/[a-z]+://[a-z0-9_-/.%]+/i','https://img.alicdn.com',$img);?> ; This is not complete either
How to use PHP regular to replace the image address http://img04.taobaocdn.com/ba...!!0-item_pic.jpg_230x230.jpg with https://img.alicdn.com/bao/up...!! 0-item_pic.jpg_230x230.jpg
img04 The 04 number behind it will change
That is, replace http://img0*.taobaocdn.com/ with https://img.alicdn.com/
I tried some methods, but either I replaced them all or it couldn’t be replaced normally
=preg_replace('/[a-z]+://[a-z0-9_-/.%]+/i','https://img.alicdn.com',$img);?> ; This is not complete either