Parse - Maple Help

URL

 Parse
 parse a URL into its components

 Calling Sequence Parse(s)

Parameters

 s - string, a URL to parse

Description

 • Parse parses a URL into a table of its component parts.
 • A URL of the form scheme://user:password@host:port/urlpath?query#anchor will be split into the following components.
 – scheme: The specified protocol (i.e. http, ftp, etc.)
 – user The username, if specified
 – host The specified host (i.e. www.maplesoft.com)
 – port The port, if specified
 – urlpath The path on the host to access
 – query Query data, if specified
 – anchor An anchor, if specified
 • The Construct method performs the reverse operation, constructing a URL from given components.

Examples

 > $\mathrm{URL}:-\mathrm{Parse}\left("scheme://user:password@host:port/urlpath?query#anchor"\right)$
 ${table}{}\left(\left[{"host"}{=}{"host"}{,}{"urlpath"}{=}{"/urlpath"}{,}{"user"}{=}{"user"}{,}{"scheme"}{=}{"scheme"}{,}{"port"}{=}{"port"}{,}{"query"}{=}{"?query"}{,}{"anchor"}{=}{"anchor"}{,}{"password"}{=}{"password"}\right]\right)$ (1)
 > $\mathrm{URL}:-\mathrm{Parse}\left("http://www.maplesoft.com/"\right)$
 ${table}{}\left(\left[{"host"}{=}{"www.maplesoft.com"}{,}{"urlpath"}{=}{"/"}{,}{"scheme"}{=}{"http"}\right]\right)$ (2)
 References

Compatibility

 • The URL[Parse] command was introduced in Maple 18.