Reputation: 9597
I'm trying to search and replace a string containing a double quote with another string but I got some issue.
I'm reading a file line per line, and searching in this line if there's a match for a replace
Example:
%%l
contain a line read from a file. For this example, %%l
= myVar: "../folder"+var
set s=%%l
set sch="+var
set rpl=val
set s=%s:!sch!=!rpl!%
echo !s!
Here, I want to replace "+var
with val
But doing this, it's not working. My echo !s!
return "+var=val
only
I also tried:
set s=%%l
set rpl=val
set s=%s:"+var=!rpl!%
And it doesn't work.
Any idea?
Thanks
Upvotes: 1
Views: 187