Jun 24, 2022 05:24 AM
Hi,
I have a question about formulas,
I have a longtext field extracted from an Email Body and I would like to find inside this field if there is any mail marked like this :
“From : email@domain.com”
and extract just the mail to put it in.
For information, I don’t know the line in question, it may have text after the email and the domains are not the same.
I have tried Regex but I have not succeed.
Thanks
Jun 24, 2022 05:44 AM
Hi there! The following REGEX should work:
REGEX_EXTRACT([YOUR TEXT FIELD], "([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)")
Let me know is that solves it!
Jun 24, 2022 06:42 AM
Hi !
thanks for the answer is gets mails but it ignores the "From : " Tag so I got anomalies and mails I don’t want
.(#ERRORS are empty fields so it’s OK)
Jun 24, 2022 07:42 AM
Sorry, this should match all From: email@email.com:
REGEX_EXTRACT({Formula 2}, "([From:+\\s]+[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)")
Jun 27, 2022 12:05 AM
Thank you I’ll look at it today But I think there will be an issue because of the space after “From” and “:”
I have managed to do something similar with
IF(FIND("From : ", {table})>0,REGEX_EXTRACT(RIGHT(table, LEN(table)-FIND("From : ", {table})-4), "([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)"), "")