Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(([2][0-5][0-5]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}([2][0-5][0-5]|1[0-9][0-9]|[1-9][0-9]|[0-9])$
/
gm

Description

IPv4 matching pattern. Excludes values over 255 or numbers with zero-prefix (e.g. 08)

Submitted by anonymous - 3 months ago