New to knime, I’m sorry if it’s a trivial question. I have a table with strings texts such as “out-of-home work schedule - meaning work relation”. I want to remove the dash preceded and followed by white spaces, but not the ones connecting the words. I tried string manipulation but I cannot find the right expression. Any sugestion?
Hi @Quendi and welcome to the KNIME community !
Maybe a -string manipulation- node could do the job with the following setting:
replace( $your_column_name$, " - ", " ")
Please notice that " - " means “blank-blank”
On top of this, maybe you would like to remove any repeated blank for which I would add the following:
removeDuplicates( strip( replace( $your_column_name$, " - ", " ")))
"removeDuplicates(...)" Replaces all occurrences of two or more spaces with a single space character.
"strip(...)" Strips any whitespace characters from the beginning and end of given strings.
Hope it helps
Thank you kind Sir, it worked.
My pleasure to help kind Sir !