找回密码
 加入
搜索
查看: 2076|回复: 3

[系统综合] 【已解决】升级新版AUTOIT后正则提取出现的问题

[复制链接]
发表于 2017-1-16 23:06:17 | 显示全部楼层 |阅读模式
本帖最后由 mgj8721 于 2017-1-17 00:22 编辑

因以前一直用3.3.6.1版本,但WIN10下@OSBuild是错的,所以前段时间下载更了 haijie1223 老师的3.3.15.0汉化版了.    发现以前的代码正则表达式提取网卡信息,更换回3.3.6.1版本又正常,这是新版本的正则变了吗?请老师们帮帮忙,如何正则提取。。。
原来代码如:
$info = StringRegExp($ver, "(Ethernet adapter(.|\n)+?Physical Address)

$ver的内容:
Ethernet adapter 以太网:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
   Physical Address. . . . . . . . . : 00-23-8B-B7-91-80
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::75e7:a8b1:e7c2:e053%5(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.1.103(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
发表于 2017-1-16 23:42:52 | 显示全部楼层
(?s)(Ethernet adapter.*?Physical Address)
 楼主| 发表于 2017-1-17 00:17:49 | 显示全部楼层
回复 2# zghwelcome


   非常感谢,问题解决了,但能否解析一下,在前面加(?s)如何理解。
发表于 2017-1-17 09:21:09 | 显示全部楼层
.匹配任意字符,包括换行符
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-28 19:08 , Processed in 0.076375 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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