I am extracting data from hundreds of emails and was wondering how I could extract certain type of words right after certain type of text from a long string.
from below, i want to retrieve guest1.test@test.com and guest2.test@test.test.test
since they are always in the same format, I want to manipulate my email string to retrieve emails after "From: " and assign it to variables and store it in a datatable.
any guidance on how to store two (or more) emails after text "From: " would much be appreciated!!!
e.g.
Subject: RE: New supplier testPerson approval & testrequired for ticket 12312321312313
From: (test guest) guest1.test@test.com
To: (test) test.test@test.test.test
Date: 9/06/2021 9:41:19 a.m.
Approved
Subject: RE: New supplier approval & testrequired for 1376611
From: (test) guest2.test@test.test.test
To: (test guest2 ) testestest.test@test.co.test
Date: 3/06/2021 12:43:16 p.m.
Approve
Guest2
do you have any idea on how I could store those multiple string values (Emails) and feed it into different variables?
eg.
var1 = 1st email
var2 = 2nd email
Is there a way to index certain words (e.g. “From:”) and explicitly assign following string to different variables?
e.g.
1st “From:” (0) → following email address gets stored in array [0]
2nd “From:” (1) → following 2nd email address gets stored in array [1]
thanks for your suggestion but when I read my file (word), below is the string I get from it.
Dont think this string format retrieves the emails I need from your suggestion solution.
How would I get the emails from below string?
Think the weird square boxes are confusing the regex
Can you please read from word rather than text and see if you can retrieve the emails? For some reason the regex isnt working when the string is read straight from the word document
oh it does work indeed. Do you have any idea why it might not be work when I copy the work flow to my existing workflow? (variables have been copied as well.)