这段变量替换代码看起来简单,实际上晕了。特请高手介入!!!
setlocal EnableDelayedExpansion
set a=1234
set str1=0123456789
set str2=零一二三四五六七八九
for /l %%b in (0,1,9) do (
set a=!a:%%str1:~%%b,1%%=%%str2:~%%b,1%%!
)
echo !a!
goto :eof
setlocal EnableDelayedExpansion
set a=1234
set str1=0123456789
set str2=零一二三四五六七八九
for /l %%b in (0,1,9) do (
set a=!a:%%str1:~%%b,1%%=%%str2:~%%b,1%%!
)
echo !a!
goto :eof

