Posted By

mocha0range on 08/04/09


Tagged

regex css regular expressions styles


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

mocha0range
vali29
LeeRJohnson
chrisjlee
cluddy
Tyster
banjomamo


Find CSS Style Definitions


 / Published in: Regular Expression
 

This finds the entire style definition - from #foo to the last brace.

i.e. ".foo, #bar { foo: bar; foo: bar; bar: foo; }"

  1. /(#|.)?[a-zA-Z0-9\_\,\.\:\# ]+[{]{1}[a-zA-Z0-9\n\r\s\:\;\#\(\)\\\/\"\'\-\_\.\,]*[}]{1}/

Report this snippet  

You need to login to post a comment.