extract_url_prefix(url)
Extracts the URL prefix from a <url>.
CREATE OR REPLACE FUNCTION `justfunctions.eu.extract_url_prefix`(`url` STRING)
RETURNS STRING AS (SPLIT(url,".")[OFFSET(0)])
OPTIONS ( description = '''Extracts the URL prefix from a <url>.''')
Example
SELECT `justfunctions.eu.extract_url_prefix`("https://en.hey.com/me/?231#213")
en