找回密码
 加入
搜索
查看: 1635|回复: 6

[网络通信] 怎么得到字符串里的数字

  [复制链接]
发表于 2018-11-15 08:58:44 | 显示全部楼层 |阅读模式
本帖最后由 smile1977 于 2018-11-15 15:38 编辑

映像名称                       PID 模块                                       
========================= ======== ============================================
explorer.exe                  1800 MSSPIREx64.dll                              
svchost.exe                    432  MSSPIREx64.dll                              
shell64.exe                  58801 MSSPIREX64.dll

只要pid 下面的数字 那位大神可以帮个忙

发表于 2018-11-15 12:15:48 | 显示全部楼层
$n=StringRegExp($Value, "(\d{4})", 3)
_ArrayDisplay($n)
 楼主| 发表于 2018-11-15 15:37:05 | 显示全部楼层
yangdai 发表于 2018-11-15 12:15
$n=StringRegExp($Value, "(\d{4})", 3)
_ArrayDisplay($n)

出问题了 pid有可能会有五位的也会有三位的呀
发表于 2018-11-15 16:14:57 | 显示全部楼层
本帖最后由 heroxianf 于 2018-11-15 16:16 编辑
smile1977 发表于 2018-11-15 15:37
出问题了 pid有可能会有五位的也会有三位的呀
针对单一数据哈,如果是信息都在一起 这个就不适用了。
$n=StringRegExp($Value, "(\d{3,6})", 3)
_ArrayDisplay($n)
 楼主| 发表于 2018-11-15 17:01:23 | 显示全部楼层
heroxianf 发表于 2018-11-15 16:14
针对单一数据哈,如果是信息都在一起 这个就不适用了。
$n=StringRegExp($Value, "(\d{3,6})", 3)
_Array ...

信息没有混在一起 都是这样的信息
发表于 2018-11-17 09:42:38 | 显示全部楼层

$n=StringRegExp($Value, "\b\d+\b", 3)
_ArrayDisplay($n)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-29 16:58 , Processed in 0.073223 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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