- @echo off
- set /an=Len=0
- for /f "delims=" %%i in ('findstr /r "1[3-58][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]"^<1.txt') do (
- set "s=%%i"
- set "str=%%i"
- setlocal enabledelayedexpansion
- for %%j in (4096 2048 1024 512 256 128 64 32 16 8 4 2 1) do (
- if "!s:~%%j!" neq "" set /a Len+=%%j & set "s=!s:~%%j!"
- )
- for /l %%j in (0,1,!len!) do (
- set t=!str:~%%j,1!
- if !t! leq 9 (
- if !t! geq 0 (
- set /a n+=1
- set num=!num!!t!
- ) else set num=&set "n=0"
- ) else set num=&set "n=0"
- if !n! equ 11 (
- echo;!num!
- set num=&set "n=0"
- )
- )
- endlocal
- )
- pause
复制代码
|