I have a string that looks similar to the following:
string = "hello,2,test,1,[4,something,3],1,2"
When I split the string by commas I get the following array:
['hello', '2', 'test', '1', '[4', 'something', '3]', '1', '2']
How could I efficiently split the original string to instead get the following:
['hello', '2', 'test', '1', '[4,something,3]', '1', '2']
['hello', 2, 'test', 1, [4, 'something', 3], 1, 2]?