Please post your code for us to see..

You could use an 'if' statement to see if the String contains the unwanted characters, If it does, skip, else.. write to file.