Consider a string like
(42,21) (23,21)
I want to get an array from this string like [42,21,23,21]
Now I can do that by splitting it 2-3 times and so on.. but i want to know if there is a more efficient way to do it, or say doing it in single line.
Like split a string on everything which is not a number!!
1 Answer