- 帖子
- 825
- 积分
- 1374
- 技术
- 178
- 捐助
- 0
- 注册时间
- 2021-10-13
|
提取尾部仅有一个'_'的字段'xxx_yyy'中的'xxx',代码如下:
@echo off
(for /f "delims=" %%s in ('reg query "HKLM\SYSTEM\CurrentControlSet\Services"') do echo,%%~nxs)>"0.0"
for /f "tokens=1 delims=_" %%1 in ('findstr /R "_[^_]*$" "0.0"') do (echo,%%1)
exit |
|