incoming/d0000c00002/data_reuse/d000/d0000c00002/ar/shared/sdtm/prod/data/idap_20191011/dm.sas7bdat
what I need is to extract only d0000c00002 before data _reuse
Sometimes the data looks like below without the prefix incoming
d0000c00004/data_reuse/d000/d0000c00004/ar/shared/adam/prod/data/idap_20191011/adlbh.sas7bdat
i just need to extract before the keyword data_reuse in both cases with and without incoming
| rex "(?<field>[^\n\/]+)\/data_reuse"
Sorry not working
| makeresults | eval _raw="d0000c00004/data_reuse/d000/d0000c00004/ar/shared/adam/prod/data/idap_20191011/adlbh.sas7bdat"
| rex "(?<field>[^\n\/]+)\/data_reuse"
| rex "^incoming\/(?<field>[^\/]+)"