"rgba(34, 53, 45, 0.5) 1px 3px",
"red 3px 0px",
"#FFFFFF 1px 5px",
"rgb(4, 23, 34) 2px 1rem 1.8rem",
"1px 0.4rem rgb(1, 45, 44)"
"rgba(34, 53, 45, 0.5)",
"red",
"#FFFFFF",
"rgb(4, 23, 34)",
"rgb(1, 45, 44)"
get = s => {
const rgb = s.match(/rgb(.+)\)/)
if(rgb) return rgb[0]
const split = s.split(/\s/)
return split.filter(val => ['px', 'em', 'rem', '%'].every(x => !val.includes(x)))[0]
}
var a = "glock seventeen 00";
var patt1 = /\s/g;
a = a.replace(patt1, '');
console.log(a);