Thanks for the help in advance. So basically I have some Strings (lets call these Strings "Numbers") that looks like this.
Numbers1 = " 3.74343E-01 4.82245E-01 1.95635E-01 -1.05565E-01 3.81702E-02"
Numbers2 = " 2.23965E-01 1.29925E-01 4.08791E-02 -4.21790E-02 -1.21410E-01"
Numbers3 = " -2.73593E-01 8.63407E-02 -1.37682E-01 -3.01382E-01 -1.51439E-01"
My program is supposed to take this string, split each piece into an individual String, and put each one in an array. So basically I need my outputted array to look like this:
StoredStrings1[] = ["3.74343E-01", "4.82245E-01", "1.95635E-01", "-1.05565E-01", "3.81702E-02"]
StoredStrings2[] = ["2.23965E-01", "1.29925E-01", "4.08791E-02", "-4.21790E-02", "-1.21410E-01"]
StoredStrings3[] = ["-2.73593E-01", "8.63407E-02", "-1.37682E-01", "-3.01382E-01", "-1.51439E-01"]
Now, what I would usually do is something like this:
StoredStrings1 = Numbers1.split(" ");
StoredStrings2 = Numbers2.split(" ");
StoredStrings3 = Numbers3.split(" ");
This way, the "Numbers" would be split based on the three spaces between each number. However, there's a slight problem. Because some of the numbers have a negative sign, the spaces in these cases are only 2 between. So basically, there's spots with 2 spaces and spots with 3 spaces between, and I do not know how I could make sure my program splits all the strings accordingly, because the split method does not work. Any help with splitting the strings all the same would be deeply appreciated.