Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(25[0-5]|2[0-4]\d|1?\d\d?)(\.\g<-2>){3}
/
gm

Description

using \g<-n> to match repeated pattern

Submitted by binger - a year ago