Business Wire interview question

parsing a string, remove a character and the one before