# Revision history [back]

refer:

refer:You can use Expression Evaluator and replace all unwanted special characters with blank space:

https://ask.streamsets.com/question/323/how-to-rename-all-fields-using-regular-expression/ https://ask.streamsets.com/question/1060/how-to-remove-n-from-the-result-dataset/for example: I want to replace all other characters accept the required charaters(ex: letters,numbers, /*#) with blank space: use the expression in expression evaluator as:

will result with:

 ${str:replaceAll(record:value('/fieldname'),str:unescapeJava('[all the unwanted characters]')," ")}  1)Either you can include all the characters you need : str:unescapeJava('[^A-Za-z0-9]') this will replace all the characters accept letters(alphabets) and numbers. 2)Or you can mention what are the characters you need to exclude : str:unescapeJava('[/*#]') this will replace all the included characters with a blank space similarly you can include more characters: You can use Expression Evaluator and replace all unwanted special characters with blank space: for example: I want to replace all other characters accept the required charaters(ex: letters,numbers, /*#) letters,numbers) with blank space: use the expression in expression evaluator as: will result with: ${str:replaceAll(record:value('/fieldname'),str:unescapeJava('[all the unwanted characters]')," ")}


1)Either you can include all the characters you need :

str:unescapeJava('[^A-Za-z0-9]') this will replace all the characters accept letters(alphabets) and numbers.

2)Or you can mention what are the characters you need to exclude :

str:unescapeJava('[/*#]') this will replace all the included characters with a blank space

similarly you can include more characters:

You can use Expression Evaluator and replace all unwanted special characters with blank space:

for For example: I want to replace all other characters accept the required charaters(ex: letters,numbers) with blank space: use the expression in expression evaluator as:

will result with:

 \${str:replaceAll(record:value('/fieldname'),str:unescapeJava('[all the unwanted characters]')," ")}


1)Either you can include all the characters you need :

str:unescapeJava('[^A-Za-z0-9]') this will replace all the characters accept letters(alphabets) and numbers.

2)Or you can mention what are the characters you need to exclude :

str:unescapeJava('[/*#]') this will replace all the included characters with a blank space

similarly you can include more characters: