سؤال

I can, according to example replace , with m,

@set str=abc,xyz
@echo %str:,=m%

However, I cannot replace it with ampersand,

@set str=abc,xyz
@echo %str:,=&%
هل كانت مفيدة؟

المحلول

@echo %str:,=^&%

you need to escape it

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top