Corion's solution looks very interesting, and now that I've seen it, I might try that first. Had I not seen that, my first instinct would have been to rely on the apparently consistent "syntactic" cues in your example, and process the data line-by-line, using known expectations:
- When I see /Transaction\s+Employee\s+-{3}\s/
I know the next two lines will complete the display of column headings.
- Having reached the end of the headings, the next line contains your "Code1/.../Code2" string; that's easy enough.
- After that, lines matching /^\s*\d{1,2}-[A-Z]{3}-\d{2}\s+.*?\s\d+\.\d{2}\s*$/
contain column data, and lines matching /^\s{10,}(.*)/ (if any) contain continuation data for the middle column;¹ these latter need to be contiguous with (directly after) the former, and the continuation is terminated by a blank line.
- Once a blank line is followed by something that doesn't match the 3-column data pattern, that's the end of the table.
So it's just a fairly well-constrained state machine: watch for start of headings, then get "code" fields, then iterate through sets of row data (3-column line, 0-or-more continuation lines, blank line); when that iteration is done, go back to watching for start of headings.
¹ update: Counting initial whitespace characters on the continuation lines might be tricky, if the input uses tabs and spaces in funny or inconsistent ways.