找回密码
 加入
搜索
楼主: friendtasy

[AU3基础] 关于字符串提取的正则编写

 火.. [复制链接]
发表于 2015-8-17 20:04:52 | 显示全部楼层
关于正则教材在论坛搜一下,大把的
发表于 2015-8-18 12:18:52 | 显示全部楼层
Local $Str1 = "C:\WINXP\WINDOWS\通用网络测试V1.1\uninstall.exe" "/U:C:\WINXP\Program Files\葵花司软件\通用网络测试V1.1\Uninstall\uninstall.xml
"
Local $Str2 = "Uninstall\uninstall.xml"
Local $Str3 = "/U:"
Local $temp1,$temp2,$targetURL
$temp1 = StringSplit($Str1,"$Str2",1)
$temp2 = StringSplit($temp1[1],$Str3,1)
$targetURL = $temp2 [2]

正则来做确实简洁又快速,但也不是唯一的办法,用个StringSplit函数也能实现。
实现某一目的,手段总会是多种多样,不需要拘束于某一种。
发表于 2015-8-18 16:10:10 | 显示全部楼层
学习了  新手很难
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-28 20:14 , Processed in 0.080489 second(s), 14 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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