That's still going to stop at spaces. There are scansets, so you could do something like %<some number>[^0123456789] to read in up to a digit. (The <some number> is the size of the buffer .name.) ...