Replace text with other text in the same line

Posted by skerit on Stack Overflow See other posts from Stack Overflow or by skerit
Published on 2010-03-25T08:58:52Z Indexed on 2010/03/25 9:03 UTC
Read the original article Hit count: 534

Filed under:
|
|
|

I don't know if I can use regex for this, but I want to replace something in this xml:

<custom-attribute name="Attribute_1" dt:dt="string">Danny Boyle</custom-attribute>
<custom-attribute name="DVD-releasedatum" dt:dt="string">06/10/1999</custom-attribute>

should become

<Attribute_1>Danny Boyle</Attribute_1>
<DVD-releasedatum>06/10/1999</DVD-releasedatum>

Removing this from the first tag isn't hard, but how can I close my newly formed tag?

© Stack Overflow or respective owner

Related posts about regex

Related posts about replace