标签: batch-file replace special-characters ampersand
我可以根据example将,替换为m,
,
m
@set str=abc,xyz @echo %str:,=m%
但是,我无法用&符替换它,
@set str=abc,xyz @echo %str:,=&%
答案 0 :(得分:4)
@echo %str:,=^&%
you need to escape it