Multiple `replace()` calls are slow.