PHP-请教个php匹配正则

PHP-请教个php匹配正则

夜无邪 发布于 2017-04-02 字数 1803 浏览 1151 回复 1

原页面代码如下:
objURL":"http://www.che51.com/UploadFiles/image/Gallery/2_Pic_200912250127432009.jpg ","fromURL":"http://www.che51.com/picture/carinfo.aspx?car_id=1781&carserialsid=227 ","fromURLHost":"http://www.che51.com ","currentIndex":"28638 ","width":174,"height":121,"type":"jpg","filesize":"52","bdSrcType":"0","di":"64754191000","is":"0,0","bdSetImgNum":0,"bdImgnewsDate":"1970-01-01 08:00","fromPageTitle":"新<strong>bmw</strong> <strong>530li</strong>典雅型 ","bdSourceName":"","bdFromPageTitlePrefix":"","token":"9011"},{"thumbURL":"http://t3.baidu.com/it/u=167097252,823550504&fm=0&gp=0.jpg","middleURL":"http://t3.baidu.com/it/u=167097252,823550504&fm=51&gp=0.jpg","largeTnImageUrl":"http://t3.baidu.com/it/u=167097252,823550504&fm=52&gp=0.jpg","hasLarge" : 0,"pageNum":41,"objURL":"http://www.2sauto.net/db/upload/s_20081013200290.jpg ","fromURL":"http://www.2sauto.net/pic/album-20.html ","fromURLHost":"http://www.2sauto.net ","currentIndex":"17531 ","width":130,"height":98,"type":"jpg","filesize":"4","bdSrcType":"0","di":"111374270850","is":"0,0","bdSetImgNum":0,"bdImgnewsDate":"1970-01-01 08:00","fromPageTitle":"南京车展-<strong>bmw</strong> <strong>530li</strong>进口宝马图 ","bdSourceName":"","bdFromPageTitlePrefix":"","token":"7047"},{"thumbURL":"http://t2.baidu.com/it/u=1935611452,1755090420&fm=0&gp=0.jpg","middleURL":"http://t2.baidu.com/it/u=1935611452,1755090420&fm=51&gp=0.jpg","largeTnImageUrl":"http://t2.baidu.com/it/u=1935611452,1755090420&fm=52&gp=0.jpg","hasLarge" : 0,"pageNum":42,"objURL":"http://img.91536.com/car/face/2008649141648477801.jpg "

我想匹配到 "objURL":" 后的图片网址,请问怎么办啊?

如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

扫码加入群聊

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

灵芸 2017-06-19 1 楼

给你调试了一下

$regx = '/objURL":"([^"]+)"/i';
preg_match_all($regx, $a, $matches);
var_dump($matches);