Stripe interview question

Had to extract some info from strings