Extracting data using regex that includes dates

Data string

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      

Desired output

#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
```

Current regex that I use could already get the company like TEST DATA MORTGAG and all , I want to know how to get the desired output above includes the date. Thanks.

If there is no date based the date on the parent
Regex : (?<=\d{3,8}\s+)[A-Z]. ?(?=\s+[A-Z]{3}\s $)

@Yoichi

Topic is forked from:

2 Likes