Pregunta de entrevista de Stripe

Given a string, separate out specific characters between two others. Write test cases