Posted by humble user on June 25, 2011 at 19:20:45:
In Reply to: Re: Multiple variables within dos substring extraction posted by Valerie on June 24, 2011 at 04:33:11:
set variable=12345
set y=3
set z=1
set X=!variable:~%y%,-%z%!
echo X = %X%
^^this suggestion is appreciated, though does not return the desired results. (At least not in my version of msdos).
echo %X%
::returns-
!variable:~3,-1!
::when it should echo 4