Reputation: 4213
current code:
set str=11.22.33
for /F "tokens=1* delims=." %%a in ("%str%") do (
echo %%a
)
I wish to produce the following outcome: .22.33
Upvotes: 0
Views: 60
Reputation: 130819
Monacraft has a working option.
Here is another option:
set "str=11.22.33"
for /f "tokens=2* delims=." %%A in ("%str%") do echo .%%a
And yet another option
set "str=11.22.33"
echo .%str:*.=%
Upvotes: 1
Reputation: 6630
Try this:
set str=11.22.33
for /F "tokens=2,3 delims=." %%a in ("%str%") do (
echo .%%a.%%b
)
Upvotes: 3