Regular Expressions 101

Community Patterns

1...456

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^(?P<IP>(?:[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-1][0-9]|22[0-3])(?:\.(?:0|[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}):(?P<PORT>(?:[1-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))$
/
gm

Description

Validate 1-223.0-255.0-255.0-255:1-65535

Submitted by dev.tntd2k2 - 2 years ago