Not sure if this is a stack or not. Does it conform to W3C standards when I use regex in CSS expression? and can this work for all the web browsers?
<style type="text/css">
a[class^='link']{color:#ccc;}
</style>
<a class="link-a">link A</a><br />
<a class="link-b">link B</a><br />
<a class="link-c">link C</a><br />
It is standardized with CSS3, even though support existed previously for this selector before CSS3 became a W3C Recommendation. Please see w3c CSS3 Selectors.
Modern browsers and IE >=7 support it. You can find it in the Compatibility Charts of Quirksmode.
I have to note it has nothing to do with Regex, you cannot use regular expressions here. The operators (
^,$) may be borrowed from Regex, but that’s all.