Parse functions
These functions can be used when parsing email addresses and URL web addresses.
| Function | Description |
|---|---|
parse::​email::host() | Parses and returns an email host from an email address |
parse::​email::user() | Parses and returns an email username from an email address |
parse::url::domain() | Parses and returns the domain from a URL |
parse::url::fragment() | Parses and returns the fragment from a URL |
parse::url::host() | Parses and returns the hostname from a URL |
parse::url::path() | Parses and returns the path from a URL |
parse::url::port() | Parses and returns the port number from a URL |
parse::url::scheme() | Parses and returns the scheme from a URL |
parse::url::query() | Parses and returns the query string from a URL |
parse::email::host
The parse::email::host function parses and returns an email host from a valid email address.
The following example shows this function, and its output, when used in a RETURN statement:
parse::email::user
The parse::email::user function parses and returns an email username from a valid email address.
The following example shows this function, and its output, when used in a RETURN statement:
parse::url::domain
The parse::url::domain function parses and returns domain from a valid URL.
This function is similar to parse::url::host only that it will return null if the URL is an IP address.
The following example shows this function, and its output, when used in a RETURN statement:
parse::url::fragment
The parse::url::fragment function parses and returns the fragment from a valid URL.
The following example shows this function, and its output, when used in a RETURN statement:
parse::url::host
The parse::url::host function parses and returns the hostname from a valid URL.
The following example shows this function, and its output, when used in a RETURN statement:
parse::url::path
The parse::url::path function parses and returns the path from a valid URL.
The following example shows this function, and its output, when used in a RETURN statement:
parse::url::port
The parse::url::port function parses and returns the port from a valid URL.
The following example shows this function, and its output, when used in a RETURN statement:
parse::url::scheme
The parse::url::scheme function parses and returns the scheme from a valid URL, in lowercase, as an ASCII string without the ':' delimiter.
The following example shows this function, and its output, when used in a RETURN statement:
parse::url::query
The parse::url::query function parses and returns the query from a valid URL.
The following example shows this function, and its output, when used in a RETURN statement: