Thursday, January 13, 2011

Remove - Remove a substring using string substitution

Description:
The string substitution feature can also be used to remove a substring from another string. The example shown here removes all occurrences of "the " from the string variable str.

Script:

set str=the cat in the hat
echo.%str%
set str=%str:the =%
echo.%str%


http://www.dostips.com/DtTipsStringManipulation.php

No comments:

Post a Comment