Hi all, I’ve downloaded a keyword list from Google Search Console, which comes with a column that contains the CTR of each column.
Im trying to convert some columns to number, but I have some problems. The number comes in this format:
2,59 %
removerchars() function does nothing. If I remover the % symbol first, and then try to remove the white space, its just there, I can’t do anything about it. The only thing that I didn’t try is the regex functions, but no matter if I replace the white space by “” or null or whatever, it just does nothing.
It drives me crazy to be honest. Why is it happening? I could modify the CSV in excel but the whole point of using Knime is automating it…
Update: It works if I do removeChars("2,59 %") but not with removeChars($CTR$) ¿? Also, the column is classified as string, so it should work, isn’t it?
Looking at the file: The space between the numbers and the % sign are not regular spaces, but protected aka. non-breaking whitespaces. Using a regular expression \s should cover protected whitespaces as well.
Anyway, it would be interesting to know how to remove this non-breaking spaces, because using \s in the string replacer node or regexReplace() function does not work. Maybe someone reads this and find it useful.
Ok, if someone reads this thread having a similar problem with non-break whitespace, it’s unicode character is \u00A0, so you can use it in the STRING REPLACER node, using Regular Expression as pattern type.
It would be specially useful for people whose language uses commas as number separator, for example Spanish.