Format a card number into the conventional display groups for its network (4-6-5 for Amex, 4-6-4 for 14-digit Diners, otherwise groups of four).