Help

Is it possible to extract URL from a hyperlink in a long text field?

Topic Labels: Formulas
Solved
Jump to Solution
1497 2
cancel
Showing results for 
Search instead for 
Did you mean: 
momentsgoneby80
7 - App Architect
7 - App Architect

I have a long text field where I copy source material. I have seen mentiononed ways to extract URLs with REGEX when they are written out in a text field, but occationaly links are copied in hyperlink form. Is there a way to extract the URL from the hyperlink?

Ideally I would need a formula that can extract both hyperlink URLs and written URLs. If there is a way to only extract links from one, specified, domain as well, then that would be the ultimate cherry on top. 

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

This is not possible with a formula field. When rich text fields are used in computed fields, they loose their formatting. 

This can be done with scripting. Links are stored in Markdown format, so you can extract both link and text from the markdown. 

See Solution in Thread

2 Replies 2
kuovonne
18 - Pluto
18 - Pluto

This is not possible with a formula field. When rich text fields are used in computed fields, they loose their formatting. 

This can be done with scripting. Links are stored in Markdown format, so you can extract both link and text from the markdown. 

momentsgoneby80
7 - App Architect
7 - App Architect

@kuovonne 
Thank you so much for taking the time to answer .

Well, though dissapointing that makes me feel a lot better about myself. I knew that the field type formats with  Markdown, so the first thing I did was to just call up the field in a formula field to see what info was actually there for a formula to work with. I figured it couldn't be done that way, but I have seen Airtable Artists like yourself perform near miraculous (to me) things before, so I figured I'd ask; if nothing else to educate myself for the future.

In my case hyperlinks are fairly rare, so it's not a big thing to do them manually rather than scripting something for it.