Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

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

Description

Matches on whole IP addresses

Submitted by Jon Stinnett - 2 years ago