【已解决】请大神帮忙修改一下正则公式,非常感谢!
本帖最后由 elexy 于 2016-5-11 14:38 编辑#include <Array.au3>
$body='{"result":1,"totalNum":573,"pageNum":1,"articlesList":[{"id":13115,"title":"APEC会议将发布“丝绸之路”ABC 计划引关注","auditDate":null,"readNum":36,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-05-09 11:11:28","auditorId":null},{"id":13108,"title":"资源税改革方案已制定完毕 水价有可能上涨","auditDate":null,"readNum":56,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-05-06 10:52:56","auditorId":null},{"id":13101,"title":"华谊兄弟进军VR优势明显","auditDate":null,"readNum":59,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-05-05 10:31:09","auditorId":null},{"id":13095,"title":"丁二烯出厂价连续上调 货源偏紧助推涨势","auditDate":null,"readNum":100,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-05-04 13:32:46","auditorId":null},{"id":13084,"title":"台驻英代表请辞:不认同民进党两岸“外交”理念","auditDate":null,"readNum":683,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-04-29 14:08:42","auditorId":null},{"id":13071,"title":"印尼14岁女孩遭14人奸杀 总统提议对罪犯处“宫刑”","auditDate":null,"readNum":1246,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-04-27 10:11:45","auditorId":null},{"id":13067,"title":"美司令扬言做好“今夜就开战”准备 中方回击","auditDate":null,"readNum":177,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-04-26 11:28:07","auditorId":null},{"id":13053,"title":" 绝对内幕:美战机曾在西沙迫降中国轰炸机 ","auditDate":null,"readNum":159,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-04-22 14:31:30","auditorId":null},{"id":13045,"title":"雪佛兰在中国重启 Cavalier车名”","auditDate":null,"readNum":236,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-04-21 13:58:48","auditorId":null},{"id":13030,"title":"库里全票蝉联MVP成历史第一人 麦蒂竟然说…","auditDate":null,"readNum":327,"combinationDate":null,"categoryId":58,"read":0,"addDate":"2016-04-19 14:29:07","auditorId":null}]}'
$_resultArray = StringRegExp($body, '([^"]+?)" >.+?">([\d\-:]+)</span>', 3)
_ArrayDisplay($_resultArray)需要获取到20个数据,按一个新闻标题,以及对应时间 依次排列下去:
APEC会议将发布“丝绸之路”ABC 计划引关注
2016-05-09 11:11:28
资源税改革方案已制定完毕 水价有可能上涨
2016-05-06 10:52:56
.....
.....
.... (?i)(?:title|Date)":"([^"]+) 练练手,在a版面前,纯属凑热闹~~(?<=title|Date)":"(.*?)" 谢谢两位,A版是神自不用说,关键要给3楼点赞,居然比A版的还要短!这个很少见啊!!!!{:face (197):}
页:
[1]