Skip to main content

DOMAIN_WITHOUT_WWW

Description​

Extract the domain name without the prefix www in the string URL

Syntax​

DOMAIN_WITHOUT_WWW ( <url> )

Parameters​

ParameterDescription
<url>Need to extract the URL without the www domain name

Return value​

Parameter <url> Domain name without the prefix www

SELECT DOMAIN_WITHOUT_WWW("https://www.apache.org/docs/gettingStarted/what-is-apache-doris")
+---------------------------------------------------------------------------------------+
| domain_without_www('https://www.apache.org/docs/gettingStarted/what-is-apache-doris') |
+---------------------------------------------------------------------------------------+
| apache.org |
+---------------------------------------------------------------------------------------+