Regular Expressions 101

Community Patterns

Match IP Address in PHP

1

Regular Expression
PCRE (PHP <7.3)

/
^([0-9]{1,3}\.){3}[0-9]{1,3}$
/

Description

Match IP Address in PHP

Submitted by anonymous - 8 years ago