Here is the example of my string:
or id:bBkeed
or name:Michael
or surname:Kronenberg
Here is the array of different values with same type and I need to create an array of values before colon and after colon.
const afterDOT = splitedValue[index].substring(splitedValue[index].indexOf(':') + 1);
const beforeDOT = splitedValue[index].substring(0, splitedValue[index].indexOf(':'));
afterDOTS.push(afterDOT);
beforeDOTS.push(beforeDOT);
I need do the same but with regex can somebody help me?