Regex to Extract Deal Id from Email Body

Hi Everyone,

I want to extract the deal code from email body where the body having a same pattern every time.

Input :
Example 1:
Hi,
Finance Information for ABC Inc (53481CRED). Could you review the attached deal.

Expected Output : 53481CRED

Example 2:
Hi,
Finance Information for ZSW Corporation (CARH 01ABRD). Could you review the attached deal.

Expected Output: CARH 01ABRD

Thanks in Advance

Hi @Binod_Kumar_Biswal

You can use this regex : ((.*?)) to extract the value using matches activity

Regards
Naman Jain

Hi @Binod_Kumar_Biswal

Can you try this

(?<=\().*(?=\))

Regards,

Thanks for the reply but in mail body multiple deal id inside the braces for example

Input:
Hi ,
Finance Information for ABC Inc (53481CRED). Could you review tye attached deal to settle the (63471DEAL) for this month.

The Entire email body will have multiple deal codes but we need to extract tye deal id which is prior to Could you please review.
Expected Output: 53481CRED

@Binod_Kumar_Biswal

(?<=\()(.*?)(?=\))(?=.*Could you review)

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.