Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

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

Description

Looks bloated, but also validates that the address format is correct, i.e. no false-positives for 777.777.777.777

Submitted by Jacob - 9 years ago