Hi,
https://forum.knime.com/t/de-duplicating-words-substrings-in-a-string/6298
I’m having an issue with de-deplucating words in a string. I’ve tried this recommended code which was given in the topic above:
regexReplace($column_name$, “(?i)\b([a-z]+)\b(?:\s+\1\b)+”, “$1”)
but it did not work.
I have a string like: Cat,Dog &Cat,Dog &Cat,Dog &Cat,Dog,Cat, Cat, Mouse,Dog,Dog,Bird,Bird
I would expect: Cat,Dog &Cat,Dog,Cat,Mouse,Dog,Bird
But after I run the code it still shows: Cat,Dog &Cat,Dog &Cat,Dog &Cat,Dog,Cat, Cat, Mouse,Dog,Dog,Bird,Bird
Can anyone help me with this?
Thanks,
Winanda