I’ve improved some of the functions that I previously built etc.
g URL-To-Protocol ]
This formula takes URL-like strings with a prepended transfer protocol and outputs the isolated transfer protocol. The input strings may include unlimited page reference depth, query strings, and browser-specific “protocols” without disrupting the output result.
Examples of input
==> output
http://example.com/some-page?q=some+query&more
==> http
chrome://settings/
==> chrome
ftp://ftp.nasdaqtrader.com/
==> ftp
Key Assumptions:
- The column “URL” exists in the current table
- Cells in the “URL” field contain a URL string
- If the reference cell is empty, the output defaults to being empty
Formula Source:
IF(SEARCH("://",{URL})="","",LEFT({URL},(SEARCH("://",{URL})-1)))
/ URL-To-Domain ]
This formula takes URL-like strings and outputs the isolated domain (and any sub-domains, if present). The input strings may include unlimited page reference depth, query strings, and browser-specific “protocols” without disrupting the output result. This formula is an optimized variation of the previous ‘url-to-domain’ formula that has been shared in here (specifically, this version is exactly 88% smaller in character length than the older one).
Examples of input
==> output
http://example.com/some-page?q=some+query&more
==> example.com
chrome://settings/
==> settings
ftp://ftp.nasdaqtrader.com/
==> ftp.nasdaqtrader.com
Key Assumptions:
- The column “URL” exists in the current table
- Cells in the “URL” field contain a URL string
- If the reference cell is empty, the output defaults to being empty
Formula Source:
IF(SEARCH("/", RIGHT(URL, (LEN(URL)-SEARCH("://", URL)-2)))="", RIGHT(URL, (LEN(URL)-SEARCH("://", URL)-2)),LEFT(RIGHT(URL, (LEN(URL)-SEARCH("://", URL)-2)), (SEARCH("/", RIGHT(URL, (LEN(URL)-SEARCH("://", URL)-2)))-1)))
< URL-to-TLD ]
By using a decoy substring (\\/\\/
) I’ve managed to simulate a sort of “parse-by-delimiter” effect that unbinds recursive parsing from the limitations of the user needing to know EXACTLY how long or how deep they need to parse. So now we can effectively “continue doing X until the end of Y” even if the actual length of “Y” is completely unknown. As a result, I’ve cut down my initial TLD parsing function by about 97.5% while simultaneously uncapping what it can handle. See the function size comparison below:

Examples of input
==> output
http://example.com/some-page?q=some+query&more
==> com
https://airtable.github.io/something-very-cool/777
==> io
http://xn--c1acbl2abdlkab1og.xn--p1ai/
==> xn--p1ai
Key Assumptions:
- The column “URL” exists in the current table
- Cells in the “URL” field contain a URL string
- If the reference cell is empty, the output defaults to being empty
- If the reference cell is an IP address, the output will be empty
- If the reference cell has a TLD that is less than 2 characters in length, the output will be empty
Formula Source:
IF(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))))="","",RIGHT(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))),(LEN(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))))-SEARCH("\\/\\/",SUBSTITUTE(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))),".","\\/\\/",(((LEN(SUBSTITUTE(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))),"."," "))-LEN(SUBSTITUTE(SUBSTITUTE(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))),"."," ")," ","")))/LEN(" "))+0))))))
I’ve improved some of the functions that I previously built etc.
g URL-To-Protocol ]
This formula takes URL-like strings with a prepended transfer protocol and outputs the isolated transfer protocol. The input strings may include unlimited page reference depth, query strings, and browser-specific “protocols” without disrupting the output result.
Examples of input
==> output
http://example.com/some-page?q=some+query&more
==> http
chrome://settings/
==> chrome
ftp://ftp.nasdaqtrader.com/
==> ftp
Key Assumptions:
- The column “URL” exists in the current table
- Cells in the “URL” field contain a URL string
- If the reference cell is empty, the output defaults to being empty
Formula Source:
IF(SEARCH("://",{URL})="","",LEFT({URL},(SEARCH("://",{URL})-1)))
/ URL-To-Domain ]
This formula takes URL-like strings and outputs the isolated domain (and any sub-domains, if present). The input strings may include unlimited page reference depth, query strings, and browser-specific “protocols” without disrupting the output result. This formula is an optimized variation of the previous ‘url-to-domain’ formula that has been shared in here (specifically, this version is exactly 88% smaller in character length than the older one).
Examples of input
==> output
http://example.com/some-page?q=some+query&more
==> example.com
chrome://settings/
==> settings
ftp://ftp.nasdaqtrader.com/
==> ftp.nasdaqtrader.com
Key Assumptions:
- The column “URL” exists in the current table
- Cells in the “URL” field contain a URL string
- If the reference cell is empty, the output defaults to being empty
Formula Source:
IF(SEARCH("/", RIGHT(URL, (LEN(URL)-SEARCH("://", URL)-2)))="", RIGHT(URL, (LEN(URL)-SEARCH("://", URL)-2)),LEFT(RIGHT(URL, (LEN(URL)-SEARCH("://", URL)-2)), (SEARCH("/", RIGHT(URL, (LEN(URL)-SEARCH("://", URL)-2)))-1)))
< URL-to-TLD ]
By using a decoy substring (\\/\\/
) I’ve managed to simulate a sort of “parse-by-delimiter” effect that unbinds recursive parsing from the limitations of the user needing to know EXACTLY how long or how deep they need to parse. So now we can effectively “continue doing X until the end of Y” even if the actual length of “Y” is completely unknown. As a result, I’ve cut down my initial TLD parsing function by about 97.5% while simultaneously uncapping what it can handle. See the function size comparison below:

Examples of input
==> output
http://example.com/some-page?q=some+query&more
==> com
https://airtable.github.io/something-very-cool/777
==> io
http://xn--c1acbl2abdlkab1og.xn--p1ai/
==> xn--p1ai
Key Assumptions:
- The column “URL” exists in the current table
- Cells in the “URL” field contain a URL string
- If the reference cell is empty, the output defaults to being empty
- If the reference cell is an IP address, the output will be empty
- If the reference cell has a TLD that is less than 2 characters in length, the output will be empty
Formula Source:
IF(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))))="","",RIGHT(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))),(LEN(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))))-SEARCH("\\/\\/",SUBSTITUTE(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))),".","\\/\\/",(((LEN(SUBSTITUTE(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))),"."," "))-LEN(SUBSTITUTE(SUBSTITUTE(IF(SUBSTITUTE(IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1)))),".","")>=0,"",IF(SEARCH("://",{URL})="","",IF(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))="",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),LEFT(RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)),(SEARCH("/",RIGHT({URL},(LEN({URL})-SEARCH("://",{URL})-2)))-1))))),"."," ")," ","")))/LEN(" "))+0))))))
Are you able to share how you created a “copy base” button at the top right of the screen please?