Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

More string handling functions

cancel
Showing results for 
Search instead for 
Did you mean: 
Sashman
6 - Interface Innovator
6 - Interface Innovator

Like SPLIT, STRPOS, CONTAINS, LEFT/RIGHT/MID etc.

Regex match maybe.

11 Comments
ripwit
6 - Interface Innovator
6 - Interface Innovator

And Replace! Would be great for building primary keys out of names that contain special characters.

Alex_Armstrong
5 - Automation Enthusiast
5 - Automation Enthusiast

This is a great request. All I’m trying to do is take a column of emails and output the domain (i.e., jsmith@example.comexample.com), which would be trivial to do with split or regular expressions.

nnnnneil
8 - Airtable Astronomer
8 - Airtable Astronomer

Hey @Alex_Armstrong, did you ever find a solution to that problem?

Kamille_Parks
16 - Uranus
16 - Uranus

@Alex_Armstrong and @nnnnneil

You could use a combination of RIGHT(), LEN() and FIND()

RIGHT({Email Field},LEN({Email Field})-FIND('@',{Email Field}))

nnnnneil
8 - Airtable Astronomer
8 - Airtable Astronomer

Thanks @Kamille_Parks. In my particular case, my email field contains single and multiple email addresses. E.g:

bob@thistest.com
craig@anothertest.com, dennis@anothertest.com, yung@anothertest.com, sam@anothertest.com

Is there a way to handle that?

Alex_Armstrong
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks @Kamille_Parks. That’s a really cool solution!

W_Vann_Hall
13 - Mars
13 - Mars

Yes — but you’re not going to like it.

The problem is that Airtable currently has no support for a processing loop; hence, you’ll need to define an explicit extraction step for up through the maximum number of emails you anticipate having in a single field. You can find detailed instructions on how to do this in this reply to a post from a user wishing to extract individual hashtags from a list. You’ll need to keep the same structure but substitute @Kamille_Parks’ domain extraction routine for the hashtag extractor in the original. (Actually, you’ll probably decide to modify your work flow instead, but on the off chance you really do press on, you’ll find all you need to know in that post.)

Kamille_Parks
16 - Uranus
16 - Uranus

Thanks @W_Vann_Hall. I code in Javascript and PHP, so every time a use case like this one comes along I yearn for a foreach() equivalent in Airtable

@nnnnneil: If you’re emails are being pulled from another table via a Lookup or Rollup, you could go back to that table, add a formula field with the Right/Len/Find formula to get the domain, and rollup/lookup the new formula field instead. Otherwise, I think W’s solution is your best bet.

nnnnneil
8 - Airtable Astronomer
8 - Airtable Astronomer

Thanks @W_Vann_Hall.

@Kamille_Parks you were right. I was thinking about it all wrong. Simply using your formula on the other table solved the problem. Then i used a rollup with arrayunique to pull the one domain from many email addresses.

Many thanks!

Gary_Stark
5 - Automation Enthusiast
5 - Automation Enthusiast

Sorry for the 2nd post, but the same issue was raised in 2 different sections. I tried to use your formula but I keep getting an error message. Any thoughts as to what I’m doing wrong? I’ve uploaded an image of what I’m seeing. Thank you!!email domain.png