Skip to main content

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

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!


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!


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)


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)


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_-]+)")

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), "(ea-zA-Z0-9._-]+@Za-zA-Z0-9._-]+\\.-a-zA-Z0-9_-]+)"), "")

Reply