Regular Expressions 101

Community Patterns

IPV4 Address Identificate

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