Regular expression to replace xml attribute
I have an xml form file:
<property name="foo" value="this is a long value">stuff</property>
There are many properties, but I want to combine the name with the name foo, and then replace its value attribute with something else:
<property name="foo" value="yet another long value">stuff</property>
I was thinking of writing a regex to match everything after "foo" to the end of the tag (">") and replace it, but I cannot get the syntax correctly.
I am trying to do this with sed if that helps.
+3