piighost/ipv4

Dotted-quad IPv4 address with each octet bounded to 0-255 and leading zeros refused. Refusing them is not cosmetic: a leading zero means octal to inet_aton and Python's ipaddress module rejects it, and allowing it made 01.99.00.12 an address, which stole the span of the dotted French phone number 01.99.00.12.34. This is the one place where the pattern departs from the library catalog. No word boundaries, so it still fires on version strings such as 1.2.3.4.

Label: IPV4

Pattern

(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)

Must be caught

Must be left alone

Tags: international, network

Download the detector as TOML