Help with String.split() for newline and spaces
What I am trying to do is take a string of numbers and convert it into an array, while cutting out the non-digits. Here is the format:
1.0000000e+000 1.3668423e+000
1.0000000e+000 1.3668423e+000
1.0000000e+000 1.3668423e+000
...
So it's basically: Space, Space, Digit, Space, Space, Digit, Newline
Right now I am using the following code (myString is a String, and dataSet1 is an Array):
var reg:RegExp = new RegExp("\n ");
myString = textLoader.data;
dataSet1 = myString.split(reg);
I've tried ("\n\s ") and ("(\n)(\s*)") and lots of other combinations, but I cannot seem to grasp how to do multiple conditions in a regular expression. All I need it to do is eliminate all spaces and newlines and I should be good.
I appreciate any and all help, thanks.
