I need to extract information within a longer string. The fields are different lengths with different number of characters before and after the information I need. But the data I need always follows TRN*1* and has an * at the end. The bold below represents what I need it to return and the red represents the common characters that precede the information I need and follow the information I need. I know how to use regex when getting information out of a set of parentheses but cannot get this to work. Also note I cannot just try to extract between the * because that returns "1"
| :IA000696026735ZPNtdfdsffds18HCCLAIMPMT250929XXXXX7737TRN*1*747918*1236209407COMPANYNAME:ZPNtlElevInd1 | |
| IA38487547488XXXXX7737TRN*1*CJ115751355262168114*1391995276*0000UMCOMPANYNAME:UMREN | |