CSS Declaration Grabber Regular Expression

2b-or-not-2bI use the same tools for development as Zach over at NoSheep. EditPlus is a sexy editor with all its FTP goodness, and packaged along with it are a number of syntax definitions for various languages as well as regular expressions for grabbing function declarations for those languages. Whats so cool about EditPlus and those regular expressions is: when you hit CTRL+F11 a handy window pops up with all the function definitions so you can click and jump to them quickly.

Sadly, EditPlus does not provide the the declaration regular expression for CSS by default…Most likely because CSS does not have any functions. Well, I live in CSS files while developing web UIs and as most people know, the CSS declarations can be hell to find. So, if you find yourself in the same place and don’t want to bother with an easy regular expression…here’s mine:

^[\t]*[a-zA-Z0-9\.# -_:@]+[\t]*\{.*[\t]*$