Adding and removing items in an Array Help

I need help and I cannot figure this out. I have an array of string. I want to join the parts of the string together into one. In the example string below, it has 10 in the array. I want to join the “Yearly,”, “Direct”, “Debit” into one. Making it go from 10 to 8 in the array. I want to also get the next 2 values after this and put it into separate variables. The string doesn’t always have 10 it may be more or less. the format is similar. It will start with a number, have the words that need to be joined then have sets of number after that. I will need to do this each time. I initially have used a for each item to go through the array and join the words, but I do not know how to add them back to the array as joined and get the next variables after that. Any help would be greatly appreciated. Below is my string and my workflow.

string[10] { “210730”, “Yearly,”, “Direct”, “Debit”, “1.00000*”, “3.80000*”, “$12,147,625.00”, “$10,494,594.00”, “$10,494,594.00”, “$0.00” }


Adding and removing Elements in a collection is better done with lists. Converting an Array to a list is quick done with yoirarrayvar.toList.

About your Detail requirement IT would Help to get IT in a more clear and Short description on Case description along with Input and expected Output Data Samples