module HostnameRegexes

Constants

EMAIL_HOST

For e-mail: Hostname of at least two segments, or bracket-enclosed IPv4 or IPv6, e.g. “example.com”, “[1.2.3.4]”, “[::1]”. Technically an e-mail with a single-component hostname might be valid on a local network, but let's avoid tons of false positives (e.g. in a typical shell prompt). */

HOSTNAME1

A hostname of at least 1 component. The last component cannot be entirely numbers. E.g. “foo”, “example.com”, “1234.com”, but not “foo.123” */

HOSTNAME2

A hostname of at least 2 components. The last component cannot be entirely numbers. E.g. “example.com”, “1234.com”, but not “1234.56” */

HOSTNAMESEGMENTCHARS_CLASS

Either an alphanumeric character or dash; or if [negative lookahead] not ASCII then any graphical Unicode character. A segment can consist entirely of numbers. (Note: PCRE doesn't support character class subtraction/intersection.) */

URL_HOST

For URL: Hostname, IPv4, or bracket-enclosed IPv6, e.g. “example.com”, “1.2.3.4”, “[::1]” */