Regular Expressions 101

Community Patterns

IP Address Match

0

Regular Expression
PCRE (PHP <7.3)

/
(?:(?:(?:2[0-5]{2}(?:\.|$))|(?:1?[0-9]{1,2}(?:\.|$)))){4}
/
gm

Description

Finy any IP address from 0.0.0.0 to 255.255.255.255.

Submitted by anonymous - 5 years ago