8
3
I'm looking to extract email addresses from text strings in Google Docs/Excel and email them automatically, where the content of the cells are currently unknown (until updated by user).
For example, they might read:
Hi,
My friend example@example.com.
Thanks,
Example Joe
OR
You should ask
example@example.co.uk
I've currently got this formula:
=IFERROR((LEFT(CELL,FIND("@",CELL)-1))&"@"&(regexextract(CELL,"@(.*)")))
It works for almost all cases, except
a) as in example 1, where someone puts a , or . at the end of the email
b) as in example 2, where the email starts on a new line, it comes in as eg.
ask
example@example.com
How might I adapt the formula to correct these?
Thank you for your helpful answer. One thought I had is that
{2, 4}
could be limiting because many upcoming TLDs like.codes
exceed 4 characters. – Alex Booker – 2019-10-02T07:57:53.110