Thank you Marco. I have a similar problem of not being able to remove ASCII 160. I know this because when I substitute in Excel (TRIM(SUBSTITUTE(CHAR(160),CHAR(32))), it works.
I tried your code in the Java Snippet (Simple) node and it gave me the following error: “Invalid settings; Unable to compile expression ERROR at line 16. Type mismatch: cannot convert from java.land.String to java.lang.Double. Line : 15 to_replace = to_replace.replaceAll(“u00A0”, “”); Line : 16 return to_replace;”
Alternatively, after reading some other posts, I have tried the String Manipulation node: Strip with RegexReplace, RemoveChars, and just Strip.
I have also tried Rule-based Row Filter:
$Col1$ = “” => TRUE; and,
$Col$ = " " => TRUE
The Java Snippet (simple) node is giving error that it can not convert string to double. I guess you left the Return type to be Double what is actually a default. Try changing it to String and run again.
Thanks for that. I managed to do it using another way:
I used the String Replacer node and asked it to replace Pattern “\u00A0” with blank. Important note: to pick “Regular expression” and for “…all occurrence”
Is there any chance this could be added as a function to the string manipulator node to remove non breaking space?
I’ve actually made a component that removes all sorts of white space from all string columns - happy to share it if there is a place for that.
I’d love to see this added back to the knime repository