SELECT `justfunctions.eu.extract_url_domain`("https://hey.com/me/?231#213")
/*--Output--
hey.com
*/
CREATE OR REPLACE FUNCTION `your_project_id.your_dataset_id.extract_url_domain`(`url` STRING)
RETURNS STRING AS (NET.REG_DOMAIN(url))
OPTIONS ( description = '''Extracts the domain from a <url>.''')
SQL User Defined Function (SQL UDF)
See something wrong? Contact us or report an issue on Github.