uri
iri
A pattern that matches valid Internationalized Resource Identifiers (IRI) according to https://www.rfc-editor.org/rfc/rfc3987.
purl
A Package URL
Also see: https://github.com/package-url/purl-spec
This parses either a string, or an object returned by Url
into a "purl".
Assume the following input:
"pkg:rpm/fedora/curl@7.50.3-1.fc25?arch=i386&distro=fedora-25"
This would match:
pattern example = purl({
"type": "rpm",
"namespace": "fedora",
"name": "curl",
"version": "7.50.3-1.fc25",
"qualifiers": {
"arch": "i386",
"distro": "fedora-25",
}
})
url
A pattern that matches a URL, splitting it up in its parts. The input must be a string.
A URL can be https:// , but also all other kinds of schemes, like gopher://
|
To verify it is a URL:
pattern is_url = net::url
To verify it is an HTTPS URL:
pattern is_url = net::url({
scheme: "https",
})
The following attributes are provided (for example from https://foo.bar:123/path/to?a=b&c=d#link
):
Name | Mandatory | Type | Description |
---|---|---|---|
|
x |
String |
Scheme/protocol part ( |
|
String |
Hostname part ( |
|
|
Integer |
Port information ( |
|
|
String |
Path ( |
|
|
String |
(encoded) query parameters ( |
|
|
String |
Trailing fragment: ( |
|
|
String |
Username of the credentials |
|
|
String |
Password of the credentials NOTE: Optional fields with no value are represented as |