Web & Network
Reliable patterns for the modern web. Validate URLs, IP addresses (v4 & v6), domain names, and URL slugs with confidence.
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.
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).
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.
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.
IPv4 Multicast Address
Matches IPv4 multicast addresses in the 224.0.0.0/4 range (224.x.x.x through 239.x.x.x).
IPv4 Link-Local Address
Matches APIPA (Automatic Private IP Addressing) link-local addresses in the 169.254.0.0/16 range.
IPv4 Address with Port
Matches an IPv4 address followed by an optional port number (1–65535), separated by a colon.
IPv4 in URL Context (http/https)
Matches an HTTP or HTTPS URL where the host is an IPv4 address, with optional port and path.
IPv4 Octet Extraction (Capture Groups)
Captures each of the four octets of an IPv4 address into named or numbered groups for programmatic use.
IPv4 Broadcast / All-Zeros Detection
Matches exactly the all-zeros address (0.0.0.0) or all-ones broadcast address (255.255.255.255).
IPv6 Full Expanded Form
Matches a fully expanded (uncompressed) 128-bit IPv6 address with all 8 groups of 4 hex digits.
IPv6 Full (Expanded + Compressed)
Comprehensive pattern matching all valid IPv6 address forms including :: compressed notation, per RFC 5952.
IPv6 Loopback Address
Matches only the IPv6 loopback address ::1 in all its valid representations.
IPv6 in URL Bracket Notation
Matches an IPv6 address enclosed in square brackets as required for use in URLs (RFC 2732).
IPv4-Mapped IPv6 Address
Matches IPv4-mapped IPv6 addresses in the ::ffff:x.x.x.x form used for dual-stack sockets.
IPv6 Link-Local Address
Matches IPv6 link-local addresses in the fe80::/10 range, optionally including a zone ID.
IPv6 with CIDR Prefix Length
Matches a valid compressed or expanded IPv6 address followed by a CIDR prefix length (/0 to /128).
IPv6 Global Unicast Address (2000::/3)
Matches IPv6 global unicast addresses starting with 2 or 3 as the first hex digit (2000::/3 block).
MAC Address (Colon-Separated, Lowercase)
Matches a standard IEEE 802 MAC address with colon separators and lowercase hex digits.
MAC Address (Colon-Separated, Case-Insensitive)
Matches a MAC address with colon separators, accepting both upper and lowercase hex digits.
MAC Address (Hyphen-Separated)
Matches a MAC address using hyphen separators as commonly seen in Windows (e.g., ipconfig output).
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).
MAC Address (No Separators)
Matches a raw 12-digit hexadecimal MAC address without any separators.
MAC OUI (Organizationally Unique Identifier)
Matches the first three octets of a MAC address (the OUI), which identifies the manufacturer.
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.
HTTP / HTTPS URL (Basic)
Matches a well-formed HTTP or HTTPS URL with a domain-name host, optional port, path, query string, and fragment.
URL Scheme Extraction
Extracts the scheme (protocol) from a URL string.
URL with Query String
Matches an HTTP/HTTPS URL that includes a query string component, capturing the query string.
URL Fragment Extraction
Extracts the fragment identifier (#section) from a URL, returning the fragment without the leading #.
URL with Port Number
Matches an HTTP/HTTPS URL where an explicit port number is present in the host:port section.
URL Path Segments
Validates a URL path consisting of one or more slash-separated segments containing URL-safe characters.
FTP URL
Matches an FTP or FTPS URL with optional user credentials, host, port, and path.
WebSocket URL (ws / wss)
Matches WebSocket URLs using the ws:// or wss:// schemes.
URL with User Authentication
Matches an HTTP or HTTPS URL containing user credentials in the userinfo component (user:password@host).
URL Slug
Matches a URL-safe slug: lowercase alphanumeric characters and hyphens, no leading/trailing hyphens, no consecutive hyphens.
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.
Full Query String
Matches a complete URL query string starting with ? and containing one or more key=value pairs separated by &.
Data URI (Base64)
Matches a base64-encoded data URI, commonly used for embedded images in HTML/CSS.
URL with IPv6 Host
Matches an HTTP/HTTPS URL where the host is an IPv6 address enclosed in square brackets.
Relative URL Path
Matches a relative URL path starting with a forward slash, allowing path segments, query strings, and fragments.
URL Host Extraction
Extracts the hostname or IP address from a full URL, excluding port, path, and credentials.
URL Protocol-Relative
Matches a protocol-relative URL that starts with // and uses the current page's scheme.
URL Percent-Encoding Validation
Validates that percent-encoded sequences in a URL are well-formed (% followed by exactly two hex digits).
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.
Domain Name with Subdomain
Matches domains with at least one subdomain level (i.e., at least two dot-separated components before the TLD).
Fully Qualified Domain Name (FQDN)
Matches a Fully Qualified Domain Name (FQDN) with a trailing dot indicating the root zone.
Domain Label (Single Segment)
Matches a single DNS label: 1–63 characters, alphanumeric and hyphens, not starting or ending with a hyphen.
Wildcard Domain
Matches wildcard domain patterns as used in SSL certificates and DNS records (*.example.com).
Punycode / Internationalized Domain Name
Matches Punycode-encoded internationalized domain names (IDN) using the xn-- prefix.
TLD Validation (2–6 Character)
Matches a standalone top-level domain label (2–6 alphabetic characters), without a leading dot.
Localhost Variants
Matches common localhost aliases: 'localhost', '::1', and 127.x.x.x addresses.
Subdomain Extraction
Extracts all subdomain levels from a hostname, returning everything to the left of the second-level domain.
Domain Name Maximum Length (253 chars)
Validates that a domain name does not exceed the 253-character total length limit per RFC 1034.
Valid TCP/UDP Port (1–65535)
Validates that a string represents a valid port number in the 1–65535 range.
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.
Registered Port (1024–49151)
Matches IANA-registered ports in the 1024–49151 range, used by user applications and services.
Dynamic / Ephemeral Port (49152–65535)
Matches ephemeral (dynamic) ports in the 49152–65535 range, typically assigned by the OS for outbound connections.
Port in URL Context (:port)
Matches a port specification as it appears in a URL host:port string, including the leading colon.
Non-Standard / High Port Detection
Detects URLs using non-standard (high) port numbers, which may indicate development servers or suspicious traffic.
HTTP Method
Matches a valid HTTP method verb (both standard RFC 7231 methods and WebDAV extensions).
HTTP Status Code
Matches valid HTTP status codes: 1xx (informational) through 5xx (server error). Optionally captures the reason phrase.
HTTP Header Field Name
Matches a valid HTTP header field name per RFC 7230: token characters only, case-insensitive.
Content-Type MIME Type
Matches a valid Content-Type header value including type/subtype and optional parameters like charset.
HTTP Bearer Token (Authorization Header)
Matches the Authorization header value in Bearer token format as used in OAuth 2.0 and JWT authentication.
HTTP Basic Auth Header
Matches a Basic Authorization header value and captures the base64-encoded credentials.
Accept-Language Header Value
Matches a valid Accept-Language header value with optional quality factors (BCP 47 language tags).
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.
X-Forwarded-For Header Value
Validates an X-Forwarded-For header value containing one or more comma-separated IP addresses (IPv4 or IPv6).
Cache-Control Directive
Matches a Cache-Control header value containing one or more directives.
UUID v4
Matches a UUID version 4 (randomly generated) in standard 8-4-4-4-12 hyphenated format.
UUID v1
Matches a UUID version 1 (time-based) in standard hyphenated format.
UUID Any Version (v1–v8)
Matches a UUID of any version (1–8) in standard hyphenated format.
Hex Color Code (#RGB / #RRGGBB / #RRGGBBAA)
Matches CSS hex color codes in 3-digit, 6-digit, or 8-digit (with alpha) formats.
Base64 Encoded String
Validates a base64-encoded string with optional padding, ensuring correct structure.
Base64 URL-Safe (No Padding)
Matches URL-safe base64 encoding (RFC 4648 §5), using - and _ instead of + and /, without padding.
JSON Web Token (JWT)
Validates the structural format of a JWT: three base64url-encoded sections separated by dots.
Email Address (RFC 5321 Simplified)
Matches a well-formed email address with a practical subset of RFC 5321 rules suitable for web form validation.
Email with Plus Addressing
Specifically matches emails with a plus tag (sub-addressing), capturing the base address and the tag separately.
MIME Type
Matches a valid MIME type (type/subtype) with optional parameter, per RFC 2045.
URL-Encoded Form Data Body
Matches an application/x-www-form-urlencoded request body: one or more ampersand-separated key=value pairs.