"Filtered Data: −−DATE−− ECOA KOB MEMBER−NO
06/12/20 B QM 02004946 TEST DATA MORTGAGE TRU
04/22/20 B BC 2844550 COMPANY XCYS XPN
BC 03575459 CAPITAL ONE TRU
BB 484BB05812 CAPITALTWO EFX
04/16/20 B FR 3996926 CRET XPN
181ZB14416 CREDOS EFX
FM 01207005 BANK R TRU"
I want to get the date including the company name . my current regex using multiline could already get the company name and here is my regex “(?<=\d{3,8}\s+)[A-Z].?(?=\s+[A-Z]{3}\s$)”
but the catch is I also wanted to extract the date , and it should check if the date is empty and the outpout should be based on the parent date
#Sample Output
06/12/20 TEST DATA MORTGAG
04/22/20 COMPANY XCYS
04/22/20 CAPITAL ONE
04/22/20 CAPITALTWO
04/16/20 CRET
04/16/20 CREDOS
04/16/20 BANK R
I think that didnt matter , I already have even extract the company name using the ff regex above , all I need to know is how could I also get the date to get the desired output above.
but what if date is empty like the example above ? how would I still achieved the output ? For example BANK R has empty date and its parent date is 04/16/20
06/12/20 TEST DATA MORTGAGE
04/22/20 COMPANY XCYS
04/22/20 CAPITAL ONE
04/22/20 CAPITALTWO
04/16/20 CRET
04/16/20 CREDOS
04/16/20 BANK R
the regex I gave u is generating a whitespace if there is no match for the date in a new line.
you can fill it with the “parent” date in the loop where you put the matches together by adding an IF condition.