How to read multiline fwf format where row may or may not flow multiline
问题 I get trade report from one of my broker as below in text file. I am trying to parse it to do some analysis. Problem is each record has multiple rows, including one aggregate row (marked with * for BUY or SELL and below that). TRADE SETTL AT BUY SELL CONTRACT DESCRIPTION EX TRADE PRICE CC DEBIT(DR)/CREDIT ------- ------- -- -------------- -------------- ------------------------------ -- ----------- -- -------------------- 11/26/2 F1 1 JAN 13 SOYBEAN MEAL 01 424.70 US ELECTRONIC TRADE F1 1*