Welcome to the Monastery | |
PerlMonks |
Re: How can I add missing XML open tagsby Jim (Curate) |
on Dec 03, 2013 at 22:54 UTC ( [id://1065505]=note: print w/replies, xml ) | Need Help?? |
Personally, I'd just do this: s{<([^/>]+?)/>}{<$1></$1>}g. Only if this didn't work for some peculiar reason would I bother with a more complicated solution. Jim UPDATE: A possibly better alternative: s{<(\w+)/>}{<$1></$1>}ag. (Notice the /a character set modifier, which is purposeful.)
In Section
Seekers of Perl Wisdom
|
|