Then I could do away with the hash at the end.
You would be better off using a different character for the start and end markers. Take a look at Serial input basics - updated Don't be put off by the title. The techniques described are equally applicable to reading from an SD card.