I have a column of data which contains data like 12 months, 15 months, 44 months.
I am trying to use String Replacer node to replace " months" with “” and then convert the column to numeric. However, my data output remains unaltered. In the settings am providing my pattern as “months” and Replacement text as “”.
hi @yogeshs
I do not know why it has this problem for you
But you can also use string manipulation with this expression: regexReplace($column1$,"months" ,"" )
did you manage to solve it? You don’t need quotes and make sure to choose option ... all occurrences instead of ... whole string otherwise you’ll do replacement only in case entire cell is matched.
One of KNIME advantages is possibility to solve same operation/task with different node/set of nodes. I wouldn’t stick with idea “Only String Replacer needs to be used to modify strings”. So I would go with @Sajjadmosaheb suggestion and if you want you can add description in node label (users including myself usually do that) what operation/modification you have done in that node.