in reply to Delete from string through s///

I recommend writing a sax filter. Based on XML::SAX::Base. Used by XML::SAX::Machines. Thats a really reliable solution.
Boris