I have an array of number like this
number = [4, -1, 6, -2, 3, 5, -7, 7]
Is there any way to split it when meets negative value?
So, it will be like this
array = [[4], [-1], [6], [-2], [3,5], [-7], [7]]
I think it can be done using regex, but I still not found it
Thanks