daniloprates daniloprates - 1 year ago 206
CSS Question

CSS selector regex anything in between

I'm creating the following elements:

.dh-tl-tl {}
.dh-tl-tr {}
.dh-tl-br {}
.dh-tl-bl {}

.dh-tr-tl {}

.dh-br-tl {}

.dh-bl-tl {}

Is there a way I could get a CSS selector to get the 4 items in each group?


[class=(?<=.dh-)(.*)(?=-bl)] {}

Answer Source

You could use the ^= ('starts with') and $= ('ends with') attribute selectors.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download