非常感谢 当前离线
二级士官
评分人数
xxpinqz (YiFeng)当前离线
中校
@echo off for /f "delims=" %%i in ('findstr /i "电话:" a.txt') do ( for /f "tokens=2-5 delims=:(),- " %%a in ("%%i") do ( set #%%a%%b=. set #%%c%%d=. ) ) for /f "delims=#=." %%a in ('set #') do echo,%%a pause复制代码
TOP
terse 当前离线
中将
@echo off&setlocal enabledelayedexpansion for /f "tokens=1* delims=:" %%i in ('findstr /i "电话:" a.txt') do ( set str=%%j set "str=!str:(=!" for %%a in (!str:(^=!) do ( set "str=%%a" if "!str:)=!" neq "!str!" ( set "str=!str:)=!" echo !str! ) else if "!str:-=!" == "!str!" ( if "!str:~10!" neq "" echo !str! ) else echo !str:-=! ) ) pause复制代码
@echo off&setlocal enabledelayedexpansion for /f "tokens=1* delims=:" %%i in ('findstr /i "电话:" a.txt') do ( set s=&set str=%%j set "str=!str:(=!" for %%a in (!str:(^=!) do ( set "str=%%a" if "!str:)=!" neq "!str!" ( set "s=!str:)=!" ) else if "!str:-=!" == "!str!" ( if "!str:~10!" neq "" set "s=!str!" ) else set "s=!str:-=!" if "!s!" neq "" if not defined $!s! echo !s!&set $!s!=$ ) ) pause复制代码
DAIC 当前离线
for /f %%j in ("!s:-= !") do set s=%%j复制代码
suseek 当前离线
列兵