Help

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

Use Regex to extract info form text

cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Marc_Evrard
5 - Automation Enthusiast
5 - Automation Enthusiast

First Airtable. is. awesome. I which I knew about it before to help organize my work.
Something I feel is missing though is a more powerful approach to deal with string-based functions.
For instance, it would be great to be able to use RegEx in the FIND or SUBSTITUTE functions.
A use case, e.g., is the extraction of part of a URL to use it as a primary key. It would allow me to name automatically a bunch of website links I wanna store.

I.e., thereโ€™s a REGEXEXTRACT function in Google Sheet, this is extremely useful for numerous of applications.

23 Comments
Andre_Zijlstra
9 - Sun
9 - Sun

@Marc_Evrard Thanks for mentioning this Google Sheet formula. For some reason I had never seen that before. I do think that the things you mention can be realized by using FIND + LEFT/MID/RIGHT + LEN and so on. Iโ€™m kinda curious to see some of the cases.

Marc_Evrard
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Andre,
Thanks for the suggestion.
For instance the function =REGEXEXTRACT(<url text>, ".*\://?([^\/]+)") in Google Sheet would extract the sub-domain and domain names of a given URL. Iโ€™m not sure how I could produce such a concise solution using a bunch of FIND, LEFT, MID, RIGHT and LEN functions. RegEx may not be particularly readable, but they are extremely powerful.
Best

Marc_Evrard
5 - Automation Enthusiast
5 - Automation Enthusiast

Just a quick follow up on this, I did solve the problem with the following formula:

MID(URL, 
    FIND("//", URL) + 2, 
    FIND("/", 
         URL, 
         FIND("//", URL) + 2
        ) - (FIND("//", URL) + 2)
   )

Some people might actually find it more readable that the regex above. Though, for instance, this problem was a rather simple one when compared to all the possibilities offered by regular expressions (some examples).
By the way, if you think about any better way to proceed with this, feel free to comment further.

Brian_Frank
6 - Interface Innovator
6 - Interface Innovator

Regex in GENERAL would be a great addition to Airtable.

Maurice
6 - Interface Innovator
6 - Interface Innovator

Oh thatโ€™s sad, I thought this existed! Damn REGEXEXTRACT is SO useful. You can enter a URL, and then get page title, meta data, even drill down to specific DIVs. I would LOVE this added.

Moe
10 - Mercury
10 - Mercury

Weโ€™ve built a tool that allows you to use Regex with Airtable.

Eiffel_Bemorese
5 - Automation Enthusiast
5 - Automation Enthusiast

Nice proposal but rather expensive in my opinion!

Eiffel_Bemorese
5 - Automation Enthusiast
5 - Automation Enthusiast

Absolutely REGEX feature is a โ€œmust haveโ€ feature in Airtable. So many problems could be resolved w/ it ( even if itโ€™s not always easy to read | understand :winking_face: )

Adam_Minich
Airtable Employee
Airtable Employee

Hello,

Adam from the Airtable support team here. We now have REGEX functions (REGEX_EXTRACT() being one of them) available for use in formula fields. You can find some more information about those functions in this support document.

Cheers!

Jeremy_Oglesby
14 - Jupiter
14 - Jupiter

@Adam_Minich, @Jason, @Taylor_Savage,

This addition to formulas deserves its own announcement post!!! This is huge!

I didnโ€™t know about this until just now when I was checking something in the formula field reference page and noticed the new โ€œRegexโ€ section. I thought, โ€œWow! Surely there was an announcement or a beta that I somehow totally missed!โ€ But I came back to the forums and all I can find are your replies to Product Suggestions from two days ago. I went at least two days not even knowing that this incredibly useful and powerful addition to formula fields existed!!!

I would suggest making an announcement post about this new feature, and when replying to Product Suggestions for the feature (like this one, which you missed), link to the announcement post instead.