Regular Expressions 101

Library entries

Grab valid LAN IPs

Vote

1

Regular Expression
pcre

/
(?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

Loading markdown...
Submitted by jchd - 6 years ago