in reply to Regular expression to replace xml data

I agree with others' posts, but if you have only this case and want straight answer to your question, here it is:

$str =~ s/>([^<>]*?)<([^<>]*?)<\//>$1&lt;$2<\//g;

Replies are listed 'Best First'.
Re^2: Regular expression to replace xml data
by Anonymous Monk on Jul 26, 2013 at 01:48 UTC
    Thank you SO MUCH. I, too, agree with the previous posts, but in my case I can't do anything about the XML parser already in place.