I'm using this code to convert a string like "rgb(200, 12, 53, 0.96)"to an array of numbers
this is my code
var rgb = 'rgb(200, 12, 53, 0.96)'.match(/\d+/g);
console.log(rgb);
but the output wrongly push 0 and 96 as separate values
how can I keep floating numbers together? i have no idea how regex works sorry
var rgb = 'rgb(200, 12, 53, 0.96)'.match(/[\d\.]+/g);