Regular Expressions 101

Community Patterns

0

Zabbix

PCRE (PHP <7.3)
no description available
Submitted by anonymous - 4 years ago

Localhost/private ip origin check

1

Regular Expression
PCRE (PHP <7.3)

/
^(https?:\/\/)?(localhost|lvh\.me|::1?|fe80::1|((::f{4}:)?(1(0|27)\.\d{1,3}|172\.(1[6-9]|2\d|3[01])|192\.168)\.\d{1,3}\.\d{1,3}))(:\d{1,5})?
/
g

Description

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