匹配css 样式的正则表达式

^[\.\#]?\w+[^{]+\{[^}]*\}

 像.main{width:966px; height:100%;}

的字符串就会被匹配处理。而且#开头以及复杂样式,都可以匹配 

转载于:https://www.cnblogs.com/lin614/archive/2010/08/24/1807103.html