Skip to main content
Solved

Extract URL from Long text cell


Forum|alt.badge.img

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 !

Best answer by Dominik_Bosnjak

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@:%_\+.~#?&//=]*)
View original
Did this topic help you find an answer to your question?

2 replies

Justin_Barrett
Forum|alt.badge.img+20

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.


Forum|alt.badge.img+17

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

Reply