I am trying to write a regex parser that will extract links from some html that is generated within our services. Now, extracting items in html I am able to do, but I have n idea how to parse the links from the following, and keep the structure, e.g with the following menu
ÃÂ ÃÂ ÃÂ <li>2</li>
What I have tried is
Now, this does get me the whole menu, but then IfÃÂ I do:
I can get the menu items, BUT, I lose the structure.
So I thought I would be able to extract the LI that contain the UL inside it, but the problem is that using the regex above to extract that LI, I retrieve the following:
Can anyone suggest a way thatÃÂ I can use regex to retrieve this keeping the same structure? or another way of processing these menus and being able to record the structure?
View Complete Post