String Substitution for a tilde

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
toshiro
Posts: 1
Joined: 26 Feb 2009 12:49

String Substitution for a tilde

#1 Post by toshiro » 26 Feb 2009 12:55

I'd like to find and change

yahoo~com

to

yahoo.com

but when I try string substitution, I think it's getting crossed up w/string indexing. I tried escaping the tilde, but no dice. Tried the quoted everything method, but same result. Any tricks I might be missing?

Thanks,

Tom

suitto
Posts: 3
Joined: 25 Feb 2009 18:05

Replace tilde

#2 Post by suitto » 26 Feb 2009 17:43

Hi Toshiro,
I tried this and it seemed to work for a tilde.
Doesn't work for me when its an equal sign

set str=simple equation yahoo~com
echo.%str%
set str=%str:o~c=o.c%
echo.%str%

Post Reply