matching nested <ul> lists
Posted: Sun Aug 17, 2008 3:59 pm
Hello,
I need to properly match a <ul></ul> block in list menu. If I try to determine the end of the block by the first closing </ul> I come to I'll get a false positive if it hits the closing </ul> of an inner nested <ul> block.
Somehow, the comparison needs to keep count of how deep it is inside the nesting, and make sure the number of closing </ul>s equals the number of opening <ul>s before it considers the pattern matched.
Thanks in advance for your help!
Rocco
I need to properly match a <ul></ul> block in list menu. If I try to determine the end of the block by the first closing </ul> I come to I'll get a false positive if it hits the closing </ul> of an inner nested <ul> block.
Somehow, the comparison needs to keep count of how deep it is inside the nesting, and make sure the number of closing </ul>s equals the number of opening <ul>s before it considers the pattern matched.
Thanks in advance for your help!
Rocco