That's a nice example for use of the Extract() function.
Is you second line always in a consistent format other than the Document type itself and the associated reference to the document number?
If so the LSPLIT() function could be useful as an alternative approach.
You are only interested in the first 4 sections (actual information of interest being in positions 1,2 and 4) which can be split up by the spaces between them.
By picking and comparing the first part of the split you can ascertain whether you are dealing wth a BOL: or a Receipt: and so, should that be significant for your output, allocate the values to the an appropriate field by using conditional processing - probably an IF() statement.
Good work uncovering a solution while you were waiting to post! Sometimes things just seem to get focused in the mind by such events and the answer appears as if by magic!