I'm trying to split a string to get the values in sets, for example I have this string:
215018,738,25094548 47137,77,1479107 80595,70,740157 38834,90,5419316 59382,82,2431554 865303,1,4 158088,44,56662 139671,61,325746 530224,5,410 783,99,14400482 268478,20,4981 577948,1,30 684122,1,40 222912,37,27987 598052,1,18 614235,1,40 69690,48,85643 235186,32,17801 329817,14,2179 118561,50,102391 380170,1,0 376338,1,0 374930,1,0 335953,1,0 -1,-1 -1,-1 -1,-1
I need to split this string by the spaces so that I end up with this:
215018,738,25094548
Next I split by commas and insert into an arraylist of a class:
ArrayList<SomeClass> someClass = new SomeClass<SomeClass>();
someClass.add(new SomeClass("215018", "738", "25094548"));
I need to do this for each value in the first string. As well I need to be able to ignore the '-1's at the end of the string.
I'm having having trouble understanding the logic and code behind doing this task.
Any help is appreciated :)