While importing some text to a Coda doc, I stumbled upon the fact that it is quite difficult to get at the URL of a hyperlink if it has display text that is not the URL itself. There is no ‘ExtractURL()’ formula or equivalent for this purpose.
After some playing around, I have come up with a workaround that relies on the hidden _Merge() formula to get at the link object’s data. You can see how to do so here:
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: