php 正则截取json中,[新人求助] 如何用正则提取出 gallery: JSON.parse 中的内容,不要头部的(和尾部的), 就是把 json.loads 拿出来...

BASE_DATA.galleryInfo = {

title: '图虫街拍摄影:街拍',

isOriginal: false,

mediaInfo: BASE_DATA.mediaInfo,

gallery: JSON.parse("{\"count\":5,\"sub_images\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261904_tt\",\"width\":797,\"url_list\":[{\"url\":\"http:\\/\\/p3.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261904_tt\"},{\"url\":\"http:\\/\\/pb9.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261904_tt\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261904_tt\"}],\"uri\":\"origin\\/tuchong.fullscreen\\/22261904_tt\",\"height\":1200},{\"url\":\"http:\\/\\/p99.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261905_tt\",\"width\":1200,\"url_list\":[{\"url\":\"http:\\/\\/p99.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261905_tt\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261905_tt\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261905_tt\"}],\"uri\":\"origin\\/tuchong.fullscreen\\/22261905_tt\",\"height\":797},{\"url\":\"http:\\/\\/p99.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261906_tt\",\"width\":1200,\"url_list\":[{\"url\":\"http:\\/\\/p99.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261906_tt\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261906_tt\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261906_tt\"}],\"uri\":\"origin\\/tuchong.fullscreen\\/22261906_tt\",\"height\":797},{\"url\":\"http:\\/\\/p99.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261914_tt\",\"width\":1200,\"url_list\":[{\"url\":\"http:\\/\\/p99.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261914_tt\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261914_tt\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261914_tt\"}],\"uri\":\"origin\\/tuchong.fullscreen\\/22261914_tt\",\"height\":797},{\"url\":\"http:\\/\\/p99.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261925_tt\",\"width\":1200,\"url_list\":[{\"url\":\"http:\\/\\/p99.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261925_tt\"},{\"url\":\"http:\\/\\/pb3.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261925_tt\"},{\"url\":\"http:\\/\\/pb1.pstatp.com\\/origin\\/tuchong.fullscreen\\/22261925_tt\"}],\"uri\":\"origin\\/tuchong.fullscreen\\/22261925_tt\",\"height\":797}],\"max_img_width\":1200,\"labels\":[\"\\u6444\\u5f71\"],\"sub_abstracts\":[\" \\u6444\\u5f71\\uff1a\\u6df1\\u84dd1970\",\" \",\" \",\" \",\" \"],\"sub_titles\":[\"\\u56fe\\u866b\\u8857\\u62cd\\u6444\\u5f71\\uff1a\\u8857\\u62cd\",\"\\u56fe\\u866b\\u8857\\u62cd\\u6444\\u5f71\\uff1a\\u8857\\u62cd\",\"\\u56fe\\u866b\\u8857\\u62cd\\u6444\\u5f71\\uff1a\\u8857\\u62cd\",\"\\u56fe\\u866b\\u8857\\u62cd\\u6444\\u5f71\\uff1a\\u8857\\u62cd\",\"\\u56fe\\u866b\\u8857\\u62cd\\u6444\\u5f71\\uff1a\\u8857\\u62cd\"]}"),

siblingList: [],

publish_time: '2018-03-10 09:08:40',

group_id: '6531116766146331139',

item_id: '6531116766146331139',

share_url: 'https://m.toutiao.com/group/6531116766146331139/',

abstract: ''.replace(/
/ig, ''),

repin: 0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值