I've got array like this with few values : name, number ( int or float) and %. This is how it looks :
["Ingredients", " Corn starch 33.02%", " sugar 22.21%", " sea salt 20.27% [1]", " peas 10%"]
now in few steps i need to remove [*] so I've got this part :
for (var i = 1; i < lines .length; i++) {
array1.push(lines [i].replace(/\[.*?\]/g, ''));
And now its part that i complete don't know how to split them into 3 values, my expected output for first value is :
1 : corn starch , 33.02 , %
Could You help me find regex to split it ?