双引号“”有问题
@echo off&setlocal ENABLEDELAYEDEXPANSION
set/p str=:
set "qq=/*/%str:!=^!%"
for /l %%i in (1,1,999) do (set "ww=!ww!!qq:~-%%i,1!"
if "!qq:~0,3!" equ "!ww:~-3!" set/a n=%%i-3&goto :x)
:x
echo !ww:~0,-3![长度:!n!]
pause>nul
@echo off&setlocal ENABLEDELAYEDEXPANSION
set/p str=:
set "qq=/*/%str:!=^!%"
for /l %%i in (1,1,999) do (set "ww=!ww!!qq:~-%%i,1!"
if "!qq:~0,3!" equ "!ww:~-3!" set/a n=%%i-3&goto :x)
:x
echo !ww:~0,-3![长度:!n!]
pause>nul
