Updated regex to allow spaces in rgb style.
Added tests