Welcome To Snipplr


Everyone's Recent Regular Expression Snippets Tagged css



« Prev 1 Next »
Regex code to match hexadecimal colors
0 183 posted 8 years ago by guilhermehn
This finds individual CSS attributes, i.e. "foo : bar;" or "bar : 2px solid foo;"
4 166 posted 10 years ago by mocha0range
This finds CSS style names, i.e. "#foo" or "#foo, .bar" Note: You'll need to chomp the trailing "\s{" off the end of the matched string. I matched it just to make sure that it didn't get anything else.
5 69 posted 10 years ago by mocha0range
This finds the entire style definition - from #foo to the last brace. i.e. ".foo, #bar { foo: bar; foo: bar; bar: foo; }"
4 66 posted 10 years ago by mocha0range
Matches CSS-style comments spanning one or multiple lines
2 87 posted 11 years ago by mikegreen
« Prev 1 Next »