First, welcome to the Forum!
Next...is the file expected to be a huge text file, or maybe just a coupla pages long? Could make a difference on how you could approach it. You can break the file into 'sections' using split(), putting each set of 7 numbers into the split array.

e.g. Dim mArray() as String
mArray = split(~your text here~,"REF*EJ*)
REM loop through your array to get only 7 'numbers'
Dim x as Integer
For x = 0 to ubound(mArray)
mArray(x) = mid(mArray(x), 1, 7)
Next X
REM You SHOULD have your sets of numbers in mArray (untested code)

EDIT: (posted during Doogle's post)--I don't DISAGREE, Doogle....but I think split() would work fine - Sam