I have a string like '123,45,6,7' and want to split it on separate digit: [1, 2, 3, 4, 5, 6, 7]
I know there is a way to split string by complex regex like this:
'1 2 3,4a5,6,7'.split(/[^\d]/) -> [1,2,3,4,5,6,7].
Is there way to split this string by regex, something like:
'123,45,6,7'.split(/[^\d]|empty string/)?