Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:(?:255\.){3}(2(?:5[542]|4[80]|24)|192|128|0)|(?:255\.){2}(?1)(?:\.0)|255\.(?1)(?:\.0){2}|(?1)(?:\.0){3})$
/
gm

Description

Matches any IPv4 mask.

Submitted by Piwi - 3 years ago (Last modified 3 years ago)