Companion

The parser.

Functions

Link copied to clipboard

Parses text as exactly <address>/<prefix>: the address strict dotted-decimal (four parts, no leading zero) or strict IPv6 (no brackets, no zone); the prefix 0..32 or 0..128 in decimal without a sign or a leading zero (except 0). A block with a bit set after the prefix is refused, not masked: 10.0.0.5/8 is a failure.