I'm having a really weird problem with preg_replace here (and as far as I can remember, this isn't the first time I've seen this). I have an XML with an element with invalid structure (closing tag is missing the slash, breaks parser):
<info>
<datetime>2013.04.12 12:04:02</datetime>
<info>
What I'm trying to do is this: $xml = preg_replace('/<info>.*<info>/iu', '', $xml)
(because I don't actually need that element), but IT DOES NOT REPLACE.
How do I make it work?