Other tips and tricks Never use colon as database separator (awk/perl), config separator and suah need to hold IPv6 address eventually if you really need to, use [addr]:port (RFC2732) Parsing IPv6 address string it is IMPOSSIBLE to write an regex! simply use getaddrinfo.