Extract specific text from email Body

I want to extract the body of an email that is in a table form(shown below) and take only the Hour values…any suggestions? (not data scraping preferably)


first read the mail using mail activities so that you can get mail body right store it in a string variable then use regex to get the hours. if it is possible provide some sample data so that we can help out more and easily

1 Like

@kalyanDev When I output the string into a text file it looks like this: (except there are more spaces between lines sometimes…
Charge Codes:


WAM 1 (General Overhead):


WAM 2 (General Training):


WAM 3 (Holiday):


WAM 4 (Jury Duty):


First Last Name

As we can see that they are in order after save it into a string, you can use a regex to keep value only.

@raymondhui I am quite new to regex…what would be a sample regex that would work for just extracting the values…also what activity/activities would i need to add to use regex

Hi @kalyanDev
Use ismatch activity

(?=WAM1).*?(?=(General overhead):slight_smile:

But here the case hours are there down to the charge code if we use ismatch how can we get hours

Hi Use this



Hi ,in regex we will use this syntax only and we have implemented in regex easily and we got thanks for advice