Removing comments from an XML document

s = "have fun <!-- ready --> when you <!-- boo --> want"
s.split(/(?=<!--)/).map {|x| x.sub(/<!--.*-->/,'')}.join
#=> "have fun  when you  want"

Tags:
Source:
1428hrs.txt
Published:
20-07-2012 14:28