This is loosely based on some other examples, but goes a bit further in terms of what it will and won't match. In particular, it matches IPv6 addresses like ff02::, ff02:1000::, and (the syntactically valid but improbable) ::0001:0002