- 批处理脚本教程
- 批处理脚本 - 主页
- 批处理脚本 - 概览
- 批处理脚本 - 环境
- 批处理脚本 - 命令
- 批处理脚本 - 文件
- 批处理脚本 - 语法
- 批处理脚本 - 变量
- 批处理脚本 - 注释
- 批处理脚本 - 字符串
- 批处理脚本 - 数组
- 批处理脚本 - 决策制定
- 批处理脚本 - 运算符
- 批处理脚本 - 日期和时间
- 批处理脚本 - 输入/输出
- 批处理脚本 - 返回代码
- 批处理脚本 - 函数
- 批处理脚本 - 进程
- 批处理脚本 - 别名
- 批处理脚本 - 设备
- 批处理脚本 - 注册表
- 批处理脚本 - 网络
- 批处理脚本 - 打印
- 批处理脚本 - 调试
- 批处理脚本 - 记录
- 批处理脚本资源
- 批处理脚本 - 快速指南
- 批处理脚本 - 有用资源
- 批处理脚本 - 讨论
批处理脚本 - 删除
字符串替换功能也可用于从另一个字符串中删除子字符串。
示例
@echo off set str = Batch scripts is easy. It is really easy. echo %str% set str = %str:is = % echo %str%
上述程序中值得注意的关键内容是,使用 :’stringtoberemoved’ = 命令,从字符串中删除了单词“is”。
输出
上述命令会产生以下输出。
Batch scripts is easy. It is really easy. Batch scripts easy. It really easy.
batch_script_strings.htm
广告