Added regex to parse1DArray in order remove extra spaces in input (which previously caused crashes)