IKeystone
asked on
Replace string inside block
Hi,
I have file with a lot of blocks like below:
<a
id="LISTENER_E"
xlink:href=""
transform="matrix(0.626373 52,0,0,0.3 3836976,-2 78.11964,4 66.9526)">
<image
id="LISTENER_E.image"
xlink:href="/images/Mobile /Icons/Cat alog_Grey_ 4.png"
height="65"
width="65"
y="502.32147"
x="1087.6489" />
</a>
I have variables with name like id : LISTENER_E=Red
What I need:
According to variable name, replace "Grey" with variable value into corresponding block
and do it without tmp files (like sed -i)
I have file with a lot of blocks like below:
<a
id="LISTENER_E"
xlink:href=""
transform="matrix(0.626373
<image
id="LISTENER_E.image"
xlink:href="/images/Mobile
height="65"
width="65"
y="502.32147"
x="1087.6489" />
</a>
I have variables with name like id : LISTENER_E=Red
What I need:
According to variable name, replace "Grey" with variable value into corresponding block
and do it without tmp files (like sed -i)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.