script to remove characters from string