i have the following string:
i need to separate each value and put it in an array. typically it would be done by ".split". however i need it to be split in this order: 0, 50, 100, 200, 400 etc..
does anyone know how to do this? please note that i need to do this in VB
in other words, i need it to read the rows left to right. i have no problem separating each number, i just need it to read it in the specified order.
thank you all for your suggestions. ive tried the regexp and i forgot to mention that after each line there is a line break. i am not sure if this would impact the regex, but in any case, after i do the regex, i get the following order: 0, 6.65, 84..??, 35.... etc
i am not getting the order i need as stated above
expected results: 0, 50, 100, 100, 200, 400, 218, 9.8, ???, 6.65, 6.31 etc...
i am going to follow some of the suggestions below by splitting up the string into separate lines initially. this code almost does that:
Dim fields() As String
fields = calculationText.Split(vbCrLf)
unfortunately for some reason the spaces are lost. when i look into the array, all the spaces between numbers are lost. why?????????