Please help me to see what is the problem with the regular expression of the intercepted URL? Thank you for taking out the addresses of all images starting with http and writing this regular expression.
$ Regstr = 'http: //. * (\. jpg | \. png | \. gif )'
Use the function to match preg_match_all ($ regstr, $ strtest2, $ match). the address of the image can be retrieved smoothly from the strtest2 string, but cannot be retrieved from strings such as strtest1, please help me see where the problem is. thank you.
$ Strtest1 = 'e7342287f1485896249c474049d5317c: 1: 0: | http://img01.taobaocdn.com/bao/uploaded/i1/T1dNrmFEJaXXXXXXXX !! 0-item_pic.jpg; 78e4591d5b18775a71912801623c0d26: 1: 1: | http://img01.taobaocdn.com/bao/uploaded/i1/1643666761/TB2aMrfaFXXXXbGXpXXXXXXXXXX !! 1643666761. jpg ;';
$ Strtest2 = '';
Reply to discussion (solution)
Use the following method.
Thanks for the Test availability.