import struct, re data = open(r'C:\git\bt411\content\BTL4.RES', 'rb').read() labOnly, maxID = struct.unpack_from(' %s' % (rid, nm, toks[:10]))