Remove both Ends

Remove the first and the last character of a string.

Description: Using :~1,-1 within a variable expansion will remove the first and last character of the string.
Script:
1.
2.
3.
4.
set str=politic
echo.%str%
set str=%str:~1,-1%
echo.%str%
Script Output:
 DOS Script Output
politic
oliti