Stripe Interview Question

Had to extract some info from strings