Extract Data from Body of Email

Hi,

I have an email and the challenge that I have is getting information from it.
Please see screen shot. I would like to get the Hi Allain and also the date.
Right now I am getting the entire body of the email. I appreciate your help with this.

Hi,

How about the following expressions

Hi Allain

System.Text.RegularExpressions.Regex.Match(strMailBody,"Hi.*?,").Value

date

System.Text.RegularExpressions.Regex.Match(strMailBody,"Date:.*?\d{4}").Value

Regards,

1 Like

should i enter this in an assign activity?

Hi,

Yes. Please use Assign activity as the following

strDate = System.Text.RegularExpressions.Regex.Match(strMailBody,"Date:.*?\d{4}").Value
1 Like

Thanks buddy , I got it working now :slight_smile:

1 Like

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