I have a string containing a simple xml structure:
<folder>
<id=1>
<id=6>
<folder>
<id=2>
<id=6>
</folder>
<folder>
<id=3>
<id=5>
</folder>
</folder>
How would I target just the folder containing id=x using regex?
For example, if id=2 I want to return just <folder><id=2><id=6></folder>