REGEXVAULT

Web & Network

Reliable patterns for the modern web. Validate URLs, IP addresses (v4 & v6), domain names, and URL slugs with confidence.

80 patterns
IPv4|

IPv4 Address (Strict 0–255)

Validates a complete IPv4 address, strictly enforcing that each octet is between 0 and 255. Rejects leading zeros, out-of-range values, and malformed syntax.

complex4 engines
IPv4|

IPv4 with CIDR Notation

Matches an IPv4 address in CIDR block notation (e.g. 192.168.1.0/24). Validates both the address portion (strict 0–255) and the prefix length (0–32).

complex4 engines
IPv4|

IPv4 Private Address Ranges

Matches only RFC 1918 private IPv4 addresses: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.

complex4 engines
IPv4|

IPv4 Loopback Address

Matches any address in the 127.0.0.0/8 loopback block (127.x.x.x), not just 127.0.0.1.

complex4 engines
IPv4|

IPv4 Multicast Address

Matches IPv4 multicast addresses in the 224.0.0.0/4 range (224.x.x.x through 239.x.x.x).

complex4 engines
IPv4|

IPv4 Link-Local Address

Matches APIPA (Automatic Private IP Addressing) link-local addresses in the 169.254.0.0/16 range.

complex4 engines
IPv4|

IPv4 Address with Port

Matches an IPv4 address followed by an optional port number (1–65535), separated by a colon.

complex4 engines
IPv4|

IPv4 in URL Context (http/https)

Matches an HTTP or HTTPS URL where the host is an IPv4 address, with optional port and path.

complex4 engines
IPv4|

IPv4 Octet Extraction (Capture Groups)

Captures each of the four octets of an IPv4 address into named or numbered groups for programmatic use.

complex4 engines
IPv4|

IPv4 Broadcast / All-Zeros Detection

Matches exactly the all-zeros address (0.0.0.0) or all-ones broadcast address (255.255.255.255).

moderate4 engines
IPv6|

IPv6 Full Expanded Form

Matches a fully expanded (uncompressed) 128-bit IPv6 address with all 8 groups of 4 hex digits.

moderate4 engines
IPv6|

IPv6 Full (Expanded + Compressed)

Comprehensive pattern matching all valid IPv6 address forms including :: compressed notation, per RFC 5952.

complex3 engines
IPv6|

IPv6 Loopback Address

Matches only the IPv6 loopback address ::1 in all its valid representations.

simple4 engines
IPv6|

IPv6 in URL Bracket Notation

Matches an IPv6 address enclosed in square brackets as required for use in URLs (RFC 2732).

moderate3 engines
IPv6|

IPv4-Mapped IPv6 Address

Matches IPv4-mapped IPv6 addresses in the ::ffff:x.x.x.x form used for dual-stack sockets.

complex4 engines
IPv6|

IPv6 Link-Local Address

Matches IPv6 link-local addresses in the fe80::/10 range, optionally including a zone ID.

complex3 engines
IPv6|

IPv6 with CIDR Prefix Length

Matches a valid compressed or expanded IPv6 address followed by a CIDR prefix length (/0 to /128).

moderate4 engines
IPv6|

IPv6 Global Unicast Address (2000::/3)

Matches IPv6 global unicast addresses starting with 2 or 3 as the first hex digit (2000::/3 block).

moderate4 engines
MAC Address|

MAC Address (Colon-Separated, Lowercase)

Matches a standard IEEE 802 MAC address with colon separators and lowercase hex digits.

moderate4 engines
MAC Address|

MAC Address (Colon-Separated, Case-Insensitive)

Matches a MAC address with colon separators, accepting both upper and lowercase hex digits.

moderate4 engines
MAC Address|

MAC Address (Hyphen-Separated)

Matches a MAC address using hyphen separators as commonly seen in Windows (e.g., ipconfig output).

moderate4 engines
MAC Address|

MAC Address (Cisco Dot-Separated)

Matches a MAC address in Cisco notation: three groups of four hex digits separated by dots (e.g., 001a.2b3c.4d5e).

moderate4 engines
MAC Address|

MAC Address (No Separators)

Matches a raw 12-digit hexadecimal MAC address without any separators.

simple4 engines
MAC Address|

MAC OUI (Organizationally Unique Identifier)

Matches the first three octets of a MAC address (the OUI), which identifies the manufacturer.

moderate4 engines
MAC Address|

EUI-64 (64-bit Extended Unique Identifier)

Matches an IEEE EUI-64 identifier: 8 groups of 2 hex digits separated by colons or hyphens. Used in IPv6 interface IDs.

moderate4 engines
URL|

HTTP / HTTPS URL (Basic)

Matches a well-formed HTTP or HTTPS URL with a domain-name host, optional port, path, query string, and fragment.

complex4 engines
URL|

URL Scheme Extraction

Extracts the scheme (protocol) from a URL string.

moderate4 engines
URL|

URL with Query String

Matches an HTTP/HTTPS URL that includes a query string component, capturing the query string.

moderate4 engines
URL|

URL Fragment Extraction

Extracts the fragment identifier (#section) from a URL, returning the fragment without the leading #.

simple4 engines
URL|

URL with Port Number

Matches an HTTP/HTTPS URL where an explicit port number is present in the host:port section.

complex4 engines
URL|

URL Path Segments

Validates a URL path consisting of one or more slash-separated segments containing URL-safe characters.

moderate4 engines
URL|

FTP URL

Matches an FTP or FTPS URL with optional user credentials, host, port, and path.

complex4 engines
URL|

WebSocket URL (ws / wss)

Matches WebSocket URLs using the ws:// or wss:// schemes.

complex4 engines
URL|

URL with User Authentication

Matches an HTTP or HTTPS URL containing user credentials in the userinfo component (user:password@host).

complex4 engines
URL|

URL Slug

Matches a URL-safe slug: lowercase alphanumeric characters and hyphens, no leading/trailing hyphens, no consecutive hyphens.

moderate4 engines
URL|

URL Query Parameter (Single key=value)

Matches and captures a single URL query parameter in key=value format, where both key and value may be URL-encoded.

moderate3 engines
URL|

Full Query String

Matches a complete URL query string starting with ? and containing one or more key=value pairs separated by &.

complex3 engines
URL|

Data URI (Base64)

Matches a base64-encoded data URI, commonly used for embedded images in HTML/CSS.

complex3 engines
URL|

URL with IPv6 Host

Matches an HTTP/HTTPS URL where the host is an IPv6 address enclosed in square brackets.

complex4 engines
URL|

Relative URL Path

Matches a relative URL path starting with a forward slash, allowing path segments, query strings, and fragments.

complex4 engines
URL|

URL Host Extraction

Extracts the hostname or IP address from a full URL, excluding port, path, and credentials.

complex4 engines
URL|

URL Protocol-Relative

Matches a protocol-relative URL that starts with // and uses the current page's scheme.

complex4 engines
URL|

URL Percent-Encoding Validation

Validates that percent-encoded sequences in a URL are well-formed (% followed by exactly two hex digits).

moderate4 engines
Domain|

Domain Name (Basic Hostname)

Matches a valid hostname consisting of dot-separated labels. Each label is 1–63 alphanumeric characters or hyphens, not starting or ending with a hyphen.

complex4 engines
Domain|

Domain Name with Subdomain

Matches domains with at least one subdomain level (i.e., at least two dot-separated components before the TLD).

moderate4 engines
Domain|

Fully Qualified Domain Name (FQDN)

Matches a Fully Qualified Domain Name (FQDN) with a trailing dot indicating the root zone.

moderate4 engines
Domain|

Domain Label (Single Segment)

Matches a single DNS label: 1–63 characters, alphanumeric and hyphens, not starting or ending with a hyphen.

moderate4 engines
Domain|

Wildcard Domain

Matches wildcard domain patterns as used in SSL certificates and DNS records (*.example.com).

moderate4 engines
Domain|

Punycode / Internationalized Domain Name

Matches Punycode-encoded internationalized domain names (IDN) using the xn-- prefix.

complex4 engines
Domain|

TLD Validation (2–6 Character)

Matches a standalone top-level domain label (2–6 alphabetic characters), without a leading dot.

simple4 engines
Domain|

Localhost Variants

Matches common localhost aliases: 'localhost', '::1', and 127.x.x.x addresses.

complex4 engines
Domain|

Subdomain Extraction

Extracts all subdomain levels from a hostname, returning everything to the left of the second-level domain.

complex3 engines
Domain|

Domain Name Maximum Length (253 chars)

Validates that a domain name does not exceed the 253-character total length limit per RFC 1034.

complex3 engines
Port|

Valid TCP/UDP Port (1–65535)

Validates that a string represents a valid port number in the 1–65535 range.

complex4 engines
Port|

Well-Known Port (1–1023)

Matches well-known ports (IANA System Ports) in the 1–1023 range. Binding to these typically requires root/admin privileges.

moderate4 engines
Port|

Registered Port (1024–49151)

Matches IANA-registered ports in the 1024–49151 range, used by user applications and services.

moderate4 engines
Port|

Dynamic / Ephemeral Port (49152–65535)

Matches ephemeral (dynamic) ports in the 49152–65535 range, typically assigned by the OS for outbound connections.

complex4 engines
Port|

Port in URL Context (:port)

Matches a port specification as it appears in a URL host:port string, including the leading colon.

complex3 engines
Port|

Non-Standard / High Port Detection

Detects URLs using non-standard (high) port numbers, which may indicate development servers or suspicious traffic.

complex3 engines
HTTP|

HTTP Method

Matches a valid HTTP method verb (both standard RFC 7231 methods and WebDAV extensions).

complex4 engines
HTTP|

HTTP Status Code

Matches valid HTTP status codes: 1xx (informational) through 5xx (server error). Optionally captures the reason phrase.

moderate4 engines
HTTP|

HTTP Header Field Name

Matches a valid HTTP header field name per RFC 7230: token characters only, case-insensitive.

moderate4 engines
HTTP|

Content-Type MIME Type

Matches a valid Content-Type header value including type/subtype and optional parameters like charset.

complex4 engines
HTTP|

HTTP Bearer Token (Authorization Header)

Matches the Authorization header value in Bearer token format as used in OAuth 2.0 and JWT authentication.

moderate4 engines
HTTP|

HTTP Basic Auth Header

Matches a Basic Authorization header value and captures the base64-encoded credentials.

moderate4 engines
HTTP|

Accept-Language Header Value

Matches a valid Accept-Language header value with optional quality factors (BCP 47 language tags).

complex4 engines
HTTP|

Cookie Name=Value Pair

Matches a single HTTP cookie name=value pair per RFC 6265, where the name is a valid token and the value is a valid cookie-octet.

moderate4 engines
HTTP|

X-Forwarded-For Header Value

Validates an X-Forwarded-For header value containing one or more comma-separated IP addresses (IPv4 or IPv6).

complex4 engines
HTTP|

Cache-Control Directive

Matches a Cache-Control header value containing one or more directives.

complex3 engines
Misc|

UUID v4

Matches a UUID version 4 (randomly generated) in standard 8-4-4-4-12 hyphenated format.

moderate4 engines
Misc|

UUID v1

Matches a UUID version 1 (time-based) in standard hyphenated format.

moderate4 engines
Misc|

UUID Any Version (v1–v8)

Matches a UUID of any version (1–8) in standard hyphenated format.

moderate4 engines
Misc|

Hex Color Code (#RGB / #RRGGBB / #RRGGBBAA)

Matches CSS hex color codes in 3-digit, 6-digit, or 8-digit (with alpha) formats.

moderate4 engines
Misc|

Base64 Encoded String

Validates a base64-encoded string with optional padding, ensuring correct structure.

moderate4 engines
Misc|

Base64 URL-Safe (No Padding)

Matches URL-safe base64 encoding (RFC 4648 §5), using - and _ instead of + and /, without padding.

simple4 engines
Misc|

JSON Web Token (JWT)

Validates the structural format of a JWT: three base64url-encoded sections separated by dots.

moderate4 engines
Misc|

Email Address (RFC 5321 Simplified)

Matches a well-formed email address with a practical subset of RFC 5321 rules suitable for web form validation.

complex4 engines
Misc|

Email with Plus Addressing

Specifically matches emails with a plus tag (sub-addressing), capturing the base address and the tag separately.

complex4 engines
Misc|

MIME Type

Matches a valid MIME type (type/subtype) with optional parameter, per RFC 2045.

complex4 engines
Misc|

URL-Encoded Form Data Body

Matches an application/x-www-form-urlencoded request body: one or more ampersand-separated key=value pairs.

complex4 engines