how to parse from the end?

The following rule sets are generated by a program, which is not readily human-readible. In order to formulate the rules into a table-like format (supposed I know all attributes in advance), e.g. code of (CA)n allele1 code of (CA)n allele2 LTC4Si_24 CTLA41i_22 APOB1c_29 IL61i_16 PAI12c_54 ... outcome support