in reply to Is it possible to insert a record after line 5 that appears on line 10?

You appear to be parsing SWIFT messages. The easiest way (as SWIFT messages are fairly short) would be to read the whole message into an array and then do array manipulation by iterating over the array indices and then inserting elements at the appropriate places. Of course you will need to find the right item after which to insert your new item, which will need some understanding of the sequence in which the items are allowed to appear, but I guess you have that already.

  • Comment on Re: Is it possible to insert a record after line 5 that appears on line 10?