For the replacement of string between two patterns i use:
String i want to change: <name>FOO</name>
I use for this:
s#(<name>).*?(</name)#\1xxxxxxxxxxx\2#g;
I'm looking for solution, when 1st patters exist in two lines:
<attributes>
<name>AUTOR</name>
<value>FOO</value>
<type>1</type>
</attributes>
I want to replace BAR
I've tried something like this, but with no results:
s#(AUTOR</name>\n\r<value>).*?(</value)#\1xxxxxxxxxxx\2#g;
EDIT:
I was convinced to use XMLStarlet
instead of SED
.