找回密码
 加入
搜索
查看: 1561|回复: 2

[AU3基础] [已解决]正则:能否帮助精简正则表达式?

[复制链接]
发表于 2010-12-16 15:39:56 | 显示全部楼层 |阅读模式
本帖最后由 newuser 于 2010-12-17 09:04 编辑
#include  <array.au3>
Local $Num="Sharon Lee Smith, Design Works Incorporated, CA, 95012"
Local $Result=StringRegExp($Num,'([^,]*),([^,]*),([^,]*),(.*)',3)
;Local $Result=StringRegExp($Num,'([^,]*),\w*',3)
;Local $Result=StringRegExp($Num,"(([^,]*),){3}(.*)",3)
_ArrayDisplay($Result)
([^,]*),([^,]*),([^,]*),(.*)能否写的更精简些?用代码中的2个方法均无效?
发表于 2010-12-16 17:02:25 | 显示全部楼层

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

发表于 2010-12-16 18:18:07 | 显示全部楼层
[^,]+
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-21 00:21 , Processed in 0.084113 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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