I just came across a similar need (extract URL from a reference in the text) and solved it with a different formula. It’s not relying on http
because the links I’m interested in are local Coda links:
RegexExtract(_Merge(thisRow.[Entered link]) + "", '(?<="url":").*?(?=")')
Use case: quickly insert a reference to a table/view or a section, and get their URL to use with Hyperlink()
/ OpenWindow()
elsewhere in the doc. This regex is not global and only returns the first "url"
match in the rich text data object.
Also FYI a trick to turn @-references into lookup references:
P.S. Oddly enough, simply ToText()
works just as fine on @-refs:
But then it doesn’t work in the original case (hyperlink with text override). So my Regex solution is still the universal one.