Pergunta de entrevista da empresa Business Wire

parsing a string, remove a character and the one before