Help

Re: Extract URL from Long text cell

Solved
Jump to Solution
2036 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Luc_LAMORE
4 - Data Explorer
4 - Data Explorer

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
Dominik_Bosnjak
10 - Mercury
10 - Mercury

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.

Dominik_Bosnjak
10 - Mercury
10 - Mercury

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@:%_\+.~#?&//=]*)