Using the PCRE engine.
I've been months working at this one (on and off) It's actually for a code indenter but I'll use html code for the example.
<ul>
<li>bla bla</li>
<ul>
<li>.....</li>
<li>more</li>
</ul>
</ul>
It's easy to get everything from the first <ul> to the first </ul> but that doesn't solve the issue. I need it to go from the first <ul> to the last </ul>
Now remember this is code blocks which could be something like nested Select statements or nested If/End If statements.
I also have to do the same thing to write code that will convert a HTML Help contents file (*.hhc) to XML output for use in a treeview control so if anyone opens a hhc file in a text editor it will be easy to see what the issues are.
Thanks for any and all input
EDIT: If you can figure it out using any engine then please post it. I can handle the conversion to Perl Compatable.