$mac =~ s/(^|:)(?=[0-9a-fA-F](?::|$))/${1}0/g;