找回密码
 加入
搜索
查看: 1797|回复: 1

[AU3基础] 【已解决】请大神帮忙修改一下正则公式,非常感谢!

  [复制链接]
发表于 2016-5-11 12:05:31 | 显示全部楼层 |阅读模式
本帖最后由 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
.....
.....
....
发表于 2016-5-11 12:45:29 | 显示全部楼层
(?i)(?:title|Date)":"([^"]+)
发表于 2016-5-11 14:16:26 | 显示全部楼层
练练手,在a版面前,纯属凑热闹~~
(?<=title|Date)":"(.*?)"
 楼主| 发表于 2016-5-11 14:38:28 | 显示全部楼层
谢谢两位,A版是神自不用说,关键要给3楼点赞,居然比A版的还要短!这个很少见啊!!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-26 00:51 , Processed in 0.081334 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表