Reading values from text file of unknown structure

A thread about reading lines with unknown length was