More string handling functions


#1

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

Regex match maybe.


#2

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


#3

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.


#4

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


#5

@Alex_Armstrong and @nnnnneil

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

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


Formula to extract email domain
#6

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?


#7

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


#8

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.)


#9

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.


#10

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!