Stripe Interview Question

Parsen the card number with different components