If your string and the extracted results fit in your memory you can use the splitWhiteSpace iterator: [https://nim-lang.org/docs/strutils.html#splitWhitespace.i,string,int](https://nim-lang.org/docs/strutils.html#splitWhitespace.i,string,int)
Otherwise write a simple parser using streams and readFloat32/readFloat64 ([https://nim-lang.org/docs/streams.html#readFloat32%2CStream](https://nim-lang.org/docs/streams.html#readFloat32%2CStream)) and discarding the space/tabs/newline in-between. In pseudocode (I may have missed something). import streams proc myReader*(path: string): seq[float32] = let stream = newFileStream(path, mode = fmRead) defer: stream.close() while not stream.atEnd(): result.add s.readFloat32() discard s.readChar Run
