

CODE: [Copy to clipboard]@echo off & setlocal
for /f "tokens=1* delims=-" %%a in (test.txt) do call :deal %%a&&echo.%%a----%%b
pause
goto:eof
:deal
setlocal enabledelayedexpansion
set "s=%~1"
set n=0
:c
set "o=!s:~%n%,1!"
if "%o%" equ "" exit /b 1
set /a i%o%+=1
if !i%o%! equ 5 exit /b 0
set /a n+=1
goto c
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |