Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?xm) (?(DEFINE) (?<byte> 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) ) ^ (10 (?:\.(?&byte)){3} | 172 \. (?: 1 [6-9] | 2\d | 3[01] ) (?:\.(?&byte)){2} | 192 \. 168 (?:\.(?&byte)){2} | ) $
/
g

Description

no description available

Submitted by jchd - 9 years ago