Reputation: 6303
I have a stream that looks like this (except with more stuff):
<ret:EditUse>Broadcast</ret:EditUse>
<EditUse>Movie</EditUse>
and I'm trying to clean the XML from it using sed:
sed "s_</?(ret:)?EditUse>__"
I've tested the regular expression using RegexPal but it doesn't seem to work in sed. Any ideas as to what's wrong?
Upvotes: 3
Views: 284
Reputation: 36262
This is the regex that works with sed
:
sed "s_</\?\(ret:\)\?EditUse>__g"
?
, (
and )
g
switch to apply the regex many times in each line.Result:
Broadcast
Movie
Upvotes: 6