I have a piece of generated HTML I am parsing. Roughly speaking, the part I am interested in for this problem looks like this:
<div class="rowset">
<div class="head">...</div>
<div class="head">...</div>
<div class="head">...</div>
<div class="head">...</div>
<div class="head">...</div>
<br><h2>WOWZA</h2><br>
<div class="head">...</div>
<div class="head">...</div>
<div class="head">...</div>
</div>
I need a way to select the divs that appear before WOWZA and the ones that appear after WOWZA in two separate operations. There will always be at least one div before and one after the WOWZA, and they always have the same class of "head". The number of head divs will vary from rowset to rowset.
The text WOWZA is constant, never changes. I just don't know how to use it as a separator in this context?
I can use jquery selectors for this too if necessary.
`? Because, [there is no CSS selector that matches text content.](https://stackoverflow.com/questions/1520429/is-there-a-css-selector-for-elements-containing-certain-text) – Kaiido Dec 10 '19 at 01:49