Hi
I have following data
/tenants/ct/108251/prod/rec/processing/apac_me/GLASS_CDGL_APAC_MONTHLY_20220831_CD01_20220901222348-EXCEPTION_20220901222916.CSV
I'm looking for
output ex:1
/tenants/ct/108251/prod/rec/processing/apac_me/GLASS_CDGL_APAC_MONTHLY_20220831_CD01-EXCEPTION_.CSV
After receiving output ex:1,
output ex:1 should used for another regex output to get
/tenants/ct/108251/prod/rec/processing/apac_me/GLASS_CDGL_APAC_MONTHLY_CD01-EXCEPTION.CSV
Solved! Go to Solution.
out1:
regex_replace([fieldname],"(.*CD01_)\d+(-EXCEPTION_)\d+(.*$)","$1$2$3",1)
out2:
regex_replace([out1],"(.*_)\d+(.*)$","$1$2")
Hi
thank you for your reply,
i made a slight mistake in my question
can you work on this please
data:
/tenants/ct/108251/prod/rec/processing/apac_me/GLASS_CDGL_APAC_MONTHLY_20220831_CD01_-EXCEPTION_.CSV
required output: /tenants/ct/108251/prod/rec/processing/apac_me/GLASS_CDGL_APAC_MONTHLY_CD01-EXCEPTION.CSV
Hope you're fine. 🙂
Find attached the good regex expressions for this case.
Let me know if you meet any issue and do not hesitate to mark this answer as solution if it helped.