String 如何将变量放入变量-批处理
我想知道如何用另外两个变量设置一个变量 我的代码:String 如何将变量放入变量-批处理,string,variables,batch-file,replace,find,String,Variables,Batch File,Replace,Find,我想知道如何用另外两个变量设置一个变量 我的代码: @echo off set str=the cat and the mouse and the car and the bull and the joker and the batman and some random guy echo.%str% set /p find= set /p replace= set str=%str:%find%=%replace%% echo.%str% pause 尝试: 尝试: 非常感谢。这正是我想要
@echo off
set str=the cat and the mouse and the car and the bull and the joker and the batman and some random guy
echo.%str%
set /p find=
set /p replace=
set str=%str:%find%=%replace%%
echo.%str%
pause
尝试:
尝试:
非常感谢。这正是我想要的谢谢你。这正是我想要的
@echo off
setlocal enableDelayedExpansion
set str=the cat and the mouse and the car and the bull and the joker and the batman and some random guy
echo.%str%
set /p find=
set /p replace=
set str=!str:%find%=%replace%!
echo.%str%
pause