Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

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

Description

Regex to identificate a IPV4 Address

Submitted by Pablo Deyvid - 3 years ago