Find CSS Style Names


/ Published in: Regular Expression
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  1. /[#|.]?[a-zA-Z0-9_,.#]+[\s]*[{]{1}/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.