<?php
$str='http//ww.test.com/1/test1.zip
http//ww.test.com/2/test2.jpeg
"http//ww.test.com/3/test3.zip"';
preg_match_all("/\"?http\/\/ww.test.com\/\d{1}\/(.*)(\"|$|\s)/isU",$str,$array);
for($i=0;$i<count($array[1]);$i++){
echo $array[1][$i]."<br>";
}
?>
$str='http//ww.test.com/1/test1.zip
http//ww.test.com/2/test2.jpeg
"http//ww.test.com/3/test3.zip"';
preg_match_all("/\"?http\/\/ww.test.com\/\d{1}\/(.*)(\"|$|\s)/isU",$str,$array);
for($i=0;$i<count($array[1]);$i++){
echo $array[1][$i]."<br>";
}
?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货