updated string by removing characters in set