Given the following DOM:
<ul>
<li><a class="section_0">section_1 item_1</a></li>
<li><a class="section_0">section_1 item_2</a></li>
<li><a class="section_1">section_2 item_1</a></li>
<li><a class="section_1">section_2 item_2</a></li>
<li><a class="section_2">section_3 item_1</a></li>
<li><a class="section_2">section_3 item_2</a></li>
</ul>
How do I select every last item per section, starting with the string "section_", with exception of the last section?
I don't want to change the DOM structure because it defines the submenu tree.
The goal is to draw a line below each section.
Edit: alternatively I could add a specific class to the last element per section, but I would prefer not to.