REGEXVAULTv2.0
$regexvaultlibrary--all

REGEX LIBRARY

417 production-tested patterns. ReDoS-verified. Multi-engine.

417 RESULTS
PER PAGE
NET-IPV4|Web & Network/IPv4|SAFE

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.

/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])$/
complex|
JSPYGOPC
VIEW
NET-IPV4|Web & Network/IPv4|SAFE

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).

/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\/(?:3[0-2]|[12][0-9]|[0-9])$/
complex|
JSPYGOPC
VIEW
NET-IPV4|Web & Network/IPv4|SAFE

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.

/^(?:10\.(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.){2}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])|172\.(?:1[6-9]|2[0-9]|3[01])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])|192\.168\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9]))$/
complex|
JSPYGOPC
VIEW
NET-IPV4|Web & Network/IPv4|SAFE

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.

/^127\.(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.){2}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])$/
complex|
JSPYGOPC
VIEW
NET-IPV4|Web & Network/IPv4|SAFE

IPv4 Multicast Address

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

/^(?:22[4-9]|23[0-9])\.(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.){2}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])$/
complex|
JSPYGOPC
VIEW
NET-IPV4|Web & Network/IPv4|SAFE

IPv4 Link-Local Address

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

/^169\.254\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])$/
complex|
JSPYGOPC
VIEW
NET-IPV4|Web & Network/IPv4|SAFE

IPv4 Address with Port

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

/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])(?::(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}))?$/
complex|
JSPYGOPC
VIEW
NET-IPV4|Web & Network/IPv4|SAFE

IPv4 in URL Context (http/https)

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

/^https?://(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])(?::(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}))?(?:/[^\s]*)?$/i
complex|
JSPYGOPC
VIEW
NET-IPV4|Web & Network/IPv4|SAFE

IPv4 Octet Extraction (Capture Groups)

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

/^((?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9]))\.((?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9]))\.((?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9]))\.((?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9]))$/
complex|
JSPYGOPC
VIEW
NET-IPV4|Web & Network/IPv4|SAFE

IPv4 Broadcast / All-Zeros Detection

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

/^(?:0\.0\.0\.0|255\.255\.255\.255)$/
moderate|
JSPYGOPC
VIEW
NET-IPV6|Web & Network/IPv6|SAFE

IPv6 Full Expanded Form

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

/^[0-9a-fA-F]{1,4}(?::[0-9a-fA-F]{1,4}){7}$/
moderate|
JSPYGOPC
VIEW
NET-IPV6|Web & Network/IPv6|SAFE

IPv6 Full (Expanded + Compressed)

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

/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:(:[0-9a-fA-F]{1,4}){1,6}|:(:[0-9a-fA-F]{1,4}){1,7}|::)$/i
complex|
JSPYPC
VIEW
NET-IPV6|Web & Network/IPv6|SAFE

IPv6 Loopback Address

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

/^(?:::1|(?:0{1,4}:){7}0*1)$/i
simple|
JSPYGOPC
VIEW
NET-IPV6|Web & Network/IPv6|SAFE

IPv6 in URL Bracket Notation

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

/^\[(?:[0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}\]$/i
moderate|
JSPYPC
VIEW
NET-IPV6|Web & Network/IPv6|SAFE

IPv4-Mapped IPv6 Address

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

/^::(?:ffff:)?(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])$/i
complex|
JSPYGOPC
VIEW
NET-IPV6|Web & Network/IPv6|SAFE

IPv6 Link-Local Address

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

/^[Ff][Ee][89AaBb][0-9a-fA-F](?::[0-9a-fA-F]{0,4}){0,7}(?:%[a-zA-Z0-9_.-]{1,20})?$/
complex|
JSPYPC
VIEW
NET-IPV6|Web & Network/IPv6|SAFE

IPv6 with CIDR Prefix Length

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

/^[0-9a-fA-F:]+\/(?:12[0-8]|1[01][0-9]|[1-9][0-9]|[0-9])$/i
moderate|
JSPYGOPC
VIEW
NET-IPV6|Web & Network/IPv6|SAFE

IPv6 Global Unicast Address (2000::/3)

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

/^[23][0-9a-fA-F]{3}(?::[0-9a-fA-F]{1,4}){7}$/i
moderate|
JSPYGOPC
VIEW
NET-MAC-|Web & Network/MAC Address|SAFE

MAC Address (Colon-Separated, Lowercase)

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

/^[0-9a-f]{2}(?::[0-9a-f]{2}){5}$/
moderate|
JSPYGOPC
VIEW
NET-MAC-|Web & Network/MAC Address|SAFE

MAC Address (Colon-Separated, Case-Insensitive)

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

/^[0-9a-fA-F]{2}(?::[0-9a-fA-F]{2}){5}$/
moderate|
JSPYGOPC
VIEW
NET-MAC-|Web & Network/MAC Address|SAFE

MAC Address (Hyphen-Separated)

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

/^[0-9a-fA-F]{2}(?:-[0-9a-fA-F]{2}){5}$/
moderate|
JSPYGOPC
VIEW
NET-MAC-|Web & Network/MAC Address|SAFE

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).

/^[0-9a-fA-F]{4}\.[0-9a-fA-F]{4}\.[0-9a-fA-F]{4}$/
moderate|
JSPYGOPC
VIEW
NET-MAC-|Web & Network/MAC Address|SAFE

MAC Address (No Separators)

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

/^[0-9a-fA-F]{12}$/
simple|
JSPYGOPC
VIEW
NET-MAC-|Web & Network/MAC Address|SAFE

MAC OUI (Organizationally Unique Identifier)

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

/^[0-9a-fA-F]{2}(?::[0-9a-fA-F]{2}){2}$/
moderate|
JSPYGOPC
VIEW
NET-MAC-|Web & Network/MAC Address|SAFE

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.

/^[0-9a-fA-F]{2}(?:[:-][0-9a-fA-F]{2}){7}$/
moderate|
JSPYGOPC
VIEW
Page 1 of 17