Title: Extract URL from copied text in Google Sheets
Tags: url;google-sheets;extract;paste
Question: I have a sheet with a text pasted from some external HTML site. It stands as the visual text, for example, "DUBLADO" is the cell and formula field.
It is not a =HYPERLINK() function (like =HYPERLINK("www.google.com.br"; "Google")). It is the text pasted with a URL embedded. In the formula field, is shows only the "DUBLADO".
How can I extract the URL from this kind of text?
Here is the sheet to see:
https://docs.google.com/spreadsheets/d/1ldne4jXRXpBiUlF1PoXPOMXwIILbmhBZL5i19U-0deY/edit?usp=sharing
Thanks in advance.
Comment: In the current stage, this can be achieved by the script using Sheets API. You can see the sample script at [this thread](https://stackoverflow.com/q/53863752). In this case, the custom function cannot be used. So please be careful this.

Comment: @RafaGuillermo, very thanks for the answer. It worded great! As I just need to one cell, I simplified the function to one line and the result is:
var url = sheets[0].data[0].rowData[0].values[0].hyperlink;



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2020:00:03/18/20', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<url><google-sheets><extract><paste>', 'Title': 'Extract URL from copied text in Google Sheets', 'ViewCount': 107, 'id': 60732809, 'user_AboutMe': None, 'user_AccountId': 5034424.0, 'user_DisplayName': 'George Emmanuel', 'user_Reputation': 13.0, 'user_Views': 13.0, 'user_id': 4043690.0}}