Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:(?:25[0-5]|2[0-4]\d|1?\d\d?)(?:[.](?!$)|$)){4}$
/
gm

Description

IP address validation

Submitted by anonymous - a year ago