var reg = /background-color[\s:]+[^;]*;/gi;var str = "background-color:#FF0000 ; asdfsffdsf ; background-color: rgb(100,100,100); ddd; sdf";str.match(reg);