Regular Expressions 101

Community Patterns

IP Address

1

Regular Expression
PCRE (PHP <7.3)

/
^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)((\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3})$
/

Description

Has group match to match 2nd third and fourth octets preceded by "."

Submitted by anonymous - 8 years ago