Community Patterns

Community Library Entry

0

Regular Expression
Created·2024-08-26 12:48
Updated·2024-08-26 13:21
Flavor·PCRE2 (PHP)

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

Description

Given a string, the regex would match if it is a valid IPv4 address.

Submitted by A-Paint-Brush