Ok,
there is a mess with some code. XML/DOM should have been used, instead, for the time being a quick fix with regex on strings is required.
I have an element, with a child node of the same type.
eg.
AAA <z id="z11"> BBB <z id="z22"> CCC </z> DDD </z> endOfString.
Is there a way in regex to match the parent node in this string.
<z id="z11"> BBB <z id="z22"> CCC </z> DDD </z>
Yes, I know this all needs to be re-written, but think of this as a pure regex question.
Thanks.