set "a=6=5"
echo %a%
6=5
echo "%a:6=5=6-5%"
"5=6-5=5"
should give me (the expected answer) 6-5
instead.
I've escaped =
after expression to be replaced, but the =
in the expression is treated by CMD as the delimiter of the substituent.
echo "%a:6=5^=6-5%"
"5^=6-5=5"
echo %a:"6=5"="6-5"%
6=5
echo %a:"6^=5"="6-5"%
6=5
How should I structure it to get 6-5
to replace 6=5
?