position variables in substring extraction use octal number recognition
Posted: 2022-May-11, 11:40 am
test this:
setlocal enableDelayedExpansion
set a=0123456789@ab3de6gh9$AB3DE6GH9
echo without '0': %a:~17,8%
echo with '0': %a:~017,10%
echo with '0': %a:~017,08%
Result:
without '0': gh9$AB3D
with '0': e6gh9$AB3D
with '0': a:~017,08
setlocal enableDelayedExpansion
set a=0123456789@ab3de6gh9$AB3DE6GH9
echo without '0': %a:~17,8%
echo with '0': %a:~017,10%
echo with '0': %a:~017,08%
Result:
without '0': gh9$AB3D
with '0': e6gh9$AB3D
with '0': a:~017,08