I have a string like this:
xxx<tag1>ABC</tag1>xxxyyyzzz<tag2>MNO</tag2>zzzz<tag1>EFG</tag1>
and I need transform this into
<tag1>ABC</tag1><tag2>MNO</tag2><tag1>EFG</tag1>
I must extract tag and it's inner content only.
I search regexp what delete all the other content
$string2 = eregi_replace($reg, $string1)