Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
((2[0-4]\d|25[0-5]|1?\d?\d)\.){3}(2[0-4]\d|25[0-5]|1?\d?\d)
/

Description

shortest ip validation regex

Submitted by Giacomo. - 9 years ago