Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Extract URL from Long text cell

Topic Labels: Scripting extentions
Solved
Jump to Solution
1393 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hello,
I’m new to Airtable, so forvige me if this has already been asked or if it is not in the right category.
In my database, I have cells that contain both text and one or more hyperlinks
I want to extract the URL from those cells and put them in a new column and I have no idea how to do so.
I would love to get some help on this please, thanks !

1 Solution

Accepted Solutions

This thread left open by mistake? Here’s a regex range that should take care of ID-ing a single URL wherever it’s unleashed, but I’d echo the above sentiment and suggest anyone looking for this functionality turn toward Airtable’s regex formulas before trying to make it work without the luxury of an intuitive UI to inform their data queries

[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)

See Solution in Thread

2 Replies 2

Welcome to the community, @Luc_LAMORE! :grinning_face_with_big_eyes: You’ve put this into the scripting category, and while scripting can be used to do this, it could also be done using one of the regular expression formula functions. These were introduced fairly recently and are a very powerful way of extracting specific things from strings. Here’s the thread where they were introduced:

I takes some time to figure them out, but it’s worth it.

This thread left open by mistake? Here’s a regex range that should take care of ID-ing a single URL wherever it’s unleashed, but I’d echo the above sentiment and suggest anyone looking for this functionality turn toward Airtable’s regex formulas before trying to make it work without the luxury of an intuitive UI to inform their data queries

[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)