字符串替换功能还可用于从另一个字符串中删除子字符串。
@echo off set str=Batch scripts is easy. It is really easy. echo %str% set str=%str:is=% echo %str%
关于上述程序,需要注意的关键是,使用:'stringtoberemoved'=command 从字符串中删除了" is"一词。
上面的命令产生以下输出。
链接:https://www.learnfk.comhttps://www.learnfk.com/batch-script/batch-script-remove.html
来源:LearnFk无涯教程网
Batch scripts is easy. It is really easy. Batch scripts easy. It really easy.
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)