ygqiang 当前离线
少尉
评分人数
@echo off&setlocal enabledelayedexpansion for /f "tokens=1,2 delims=-" %%a in (rq.txt) do ( echo 源串:%%a-%%b pause if 1%%a lss 100 (set var1=0%%a) else set var1=%%a if 1%%b lss 100 (set var2=0%%b) else set var2=%%b echo !var1!-!var2!>>test.txt ) del /q rq.txt ren test.txt rq.txt 1pause复制代码
TOP
Nsqs 当前离线
@echo off (for /f "tokens=1,2 delims=-" %%a in (a.txt)do ( set /a n=%%a*1,n0=n/10,n1=n%%10,n=%%b*1,n2=n/10,n3=n%%10 call set s=%%n0%%%%n1%%-%%n2%%%%n3%% call echo %%s%% ))>new.txt复制代码
WHY 当前离线
上校
@if (0)==(0) echo off cscript //nologo //e:jscript "%~f0" <a.txt pause & exit @end var s = WSH.StdIn.ReadAll(); s = s.replace(/^(\d{1,2})-(\d{1,2})\r?$/gm, function(s0, s1, s2){ return (s1*1 + 100 + '').substr(1) + '-' + (s2*1 + 100 + '').substr(1); } ) WSH.Echo(s)复制代码
hlzj88 当前离线
少校
@echo off&&setlocal enabledelayedexpansion for /f "delims=- tokens=1,2," %%i in (rq.txt) do ( set aa=0%%i set aa=!aa:~-2,2! set bb=0%%j set bb=!bb:~-2,2! echo !aa!-!bb!>>rq1.txt ) pause复制代码