Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-05-11 01:50
Flavor·PCRE2 (PHP)

/
^(?:(?:2[0-4][0-9]|25[0-5]|1?[0-9]?[0-9])\.){3}(?:2[0-4][0-9]|25[0-5]|[0-1]?[0-9]?[0-9])$
/
gm
Open regex in editor

Description

192.168.254.1 match 0.0.0.0 match 01.01.01.01 does not match 255.255.255.255 match 255.0.0.0 match 0.0.0.256 does not match

Submitted by nihuge