Domanda

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:,=&%
È stato utile?

Soluzione

@echo %str:,=^&%

you need to escape it

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top