- @echo off
- setlocal enabledelayedexpansion
- set /p str=请输入:
- (echo %str% | find "#" || goto:eof)>nul
- set /p letter=输入开始、末尾(例: A-F ):
- set startL=!letter:~0,1!
- set endL=!letter:~2,1!
- for /f "tokens=2 delims=%startL%%endL%" %%A in ("1ABCDEFGHIJKLMNOPQRSTUVWXYZ1") do (
- set letters=%startL%%%A%endL%
- )
- for /l %%i in (0,1,100) do (
- if not "!letters:~%%i,1!" equ "" (
- set n=!letters:~%%i,1!
- call echo %str:#=!n!%
- )
- )
- pause
复制代码
我太菜了,对 通配符 做替换,我不会...只好换成 # ,顺便等待高手解答 |