When working with Perl regex, I understand how positive lookahead works - such as q(?=u)
matching a q that is followed by a u without including the u in the match. Now, I am interested in finding something similar in CSS: specifically, I am looking to select a div
element that is immediately followed by another sibling div
with the class specialClass
.
<div>..</div> <!-- div to match -->
<div class="specialClass">..</div>
I have experimented with using the + selector, but found that it matches the div.specialClass
itself instead of the preceding div
element.