Reversing replaced whitespace so that the character positions match up