I've always wondered the exact specifics of how $mask() chooses wildcards for portions of a fulladdress. It's obviously aware when it's working with a hostname versus an IP address (v4 and v6), or something that is neither. It also seems to treat different domain names with different subdomain names differently, such as those ending with .co.uk ccTLD instead of a .net TLD.

Could you explain each mask for us, and all of those little case conditions that ultimately decides on a wildcard and its positioning?


Well. At least I won lunch.
Good philosophy, see good in bad, I like!