Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Extracting first email in a field with multiple emails

Jump to Solution
276 9
Showing results for 
Search instead for 
Did you mean: 

This may have been covered, but I cannot find it. I have a field that has several emails in it. It is a lookup field I need to extract the first email in the list. Can someone help me with the formula?

1 Solution

Accepted Solutions

Thank you! That just eliminated a few extra fields! :partying_face:

See Solution in Thread

9 Replies 9

Hi @Kirsten_Kern,

Instead of a Lookup field, use a Rollup field and use the ArrayJoin function

Then in your formula field use the following. Replace {Email Rollup} with your reference.

REGEX_EXTRACT({Email Rollup}, "^(.+?),")

Hi Zack,
Thank you for your prompt response.

Works great for all fields except where I only have one email and then I get an error message. Is there a way to fix this?

Move the question mark to after the comma ^(.+),?

REGEX_EXTRACT({Email Rollup}, "^(.+),?")

Thank you; however, that returned all of the multiples. To be clear, I used the second formula and the error message was removed but the extraction of only one email part of the formula gave me multiple emails again. Basically, the second formula with the question mark moved after the comma gave me my exactly what my rollup gave me.

Sorry, I thought that was working for me.

The below does work for me in Airtable.

Try this [^,]*

Brilliant. I am doing the happy dance. Thank you. Those REGEX thingies are like martian speak to me.
:kiss: .

For anyone looking over our shoulders, this was the final formula: REGEX_EXTRACT({One email}, “[^,]*”)

Where, {One email} was my reference field.

They are very new to me as well but are great with some basic understanding :thumbs_up:

Thanks to @Ben.Young. Thought they were scary and never attempted learning them before.

As a bit of a side note, you can actually just write the whole formula inside of the rollup field’s formula configuration.

I’m on mobile right now, so this might look weird or need a tweak, but it would look something like this:


Thank you! That just eliminated a few extra fields! :partying_face: