(?<selector>[^\{\s]+\w+(\s\[^\{\s]+)?)\s?\{(?<style>[^\}]*)\}
The above matches almost all cases.
audio:not([controls])
{
display:none
}
Anything like this however (with the square brackets), does not match properly.
button,input[type="button"],input[type="reset"],input[type="submit"]
{
cursor:pointer;-webkit-appearance:button
}
input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button
{
-webkit-appearance:none
}
these too…
Try this:
Explanation:
No blank style, pattern is not going to match!