I'm trying to split a string based on the value that is after : using RegEx pattern.
I was expecting the result to be something like
[
"hello",
"js is fun!",
""
]
Could anyone please help?
Excerpt from my code
const str = '0,0,5:hello0,1,5:js is fun!0,2,0:'
const result = str.match(/:[a-z]*/g);
console.log(result)