Remove specified characters from a string