Library

DFA · Regular

A full IPv4 address

Four octets from 0 to 255, no leading zeros, separated by dots. The machine is the one-octet DFA four times over, chained by the dots — concatenation drawn literally. Minimised, each copy shares its end states with the dot that follows.

11·done1·one1·two1·any21·lim2·done2·one2·two2·any32·lim3·done3·one3·two3·any43·lim4·done4·one4·two4·any4·lim
The machine as drawn — 24 states, 199 transitions.

The author’s examples, run

0.0.0.0 → accept192.168.1.1 → accept255.255.255.255 → accept10.0.0.256 → reject1.2.3 → reject01.2.3.4 → reject1..2.3 → reject1.2.3.4.5 → reject