Originally posted by mouzeming at 2006-12-28 09:08:
问题又来了.不好意思,
数字是提出来了.比如用户输入的是a001 & a100
如果是像a001这样的数.我需要的是把前面的a00去掉..
如果是a100这样的数,我只 ...
@echo off
set "var=abc000123000"
for %%n in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call set var=%%var:%%n=%%
:loop
if "%var:~0,1%" == "0" set var=%var:~1%&&goto loop
echo %var%
pause
Originally posted by mouzeming at 2006-12-28 09:08:
Here comes the problem again. Sorry,
The number is put forward. For example, the user enters a001 & a100
If it is a number like a001, I need to remove the a00 in front..
If it is a number like a100, I only ...
@echo off
set "var=abc000123000"
for %%n in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call set var=%%var:%%n=%%
:loop
if "%var:~0,1%" == "0" set var=%var:~1%&&goto loop
echo %var%
pause