Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
((?<IPv4_dec_octet>[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3,3}(?<IPv4_dec_octet_end>[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])
/
g

Description

IPv4 Validation to RFC 3986 found at https://tools.ietf.org/html/rfc3986#section-1.1.1.

Submitted by anonymous - 8 years ago