Posted By

mocha0range on 08/04/09


Tagged

regex css regular expressions styles


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

mocha0range
vali29
chrisjlee
benrudolph
Tyster


Find CSS Style Names


 / Published in: Regular Expression
 

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.

  1. /[#|.]?[a-zA-Z0-9_,.#]+[\s]*[{]{1}/

Report this snippet  

You need to login to post a comment.