那就来个不用查找的。- @echo off
- set "Str=bathome112222bathome;l23333 33bathome;4444bathome555bathome"
- :loop
- set num=%str:*bathome=%
- call set var=a%%str:bathome%num%=%%a
- if not "%var%"=="aa" echo.%var:~1,-1%
- set str=%num%
- if "%str%"=="%var:~1,-1%" set "num="
- if defined num goto loop
- pause
复制代码
|