I know in Perl regex the notion of the positive lookahead ie q(?=u)
matches a q that is followed by a u, without making the u part of the match. I'm looking for something similar in css: I want to match a div
, followed by a sibling div.specialClass
.
<div>..</div> <!-- div to match -->
<div class="specialClass">..</div>
I've played around with + but that matches with div.specialClass
, whereas I want the preceding div
.