Negative sign at the end


First I’m a very beginner, so sorry if my question is super basic…

I have an extract (a TXT, comma-separated) in which all numbers are stored in a strange way… the negative sign is at the end of the number (example 100.0-).

I don’t know how to transform it. I would like to do a “string manipulation”, replace (string, * -, - *) with * as a wildcard, but it doesn’t work - probably because of a wrong syntax…

After that I want to transform it to a double.

Do you have an advice ??

Thank you.


Hi @Zarkoff95 -

Here’s one way you could do it. I’m sure there’s a more elegant way, but this may illustrate for you the use of some nodes you’re not familiar with.



Reformat_Negative_Number_Strings.knwf (12.4 KB)


Thank you, that’s very smart !
My main problem is that I have the Excel way-of-thinking, and never think to create columns to sequence the transformation.


Hi have the same problem. Maybe, in the “string to number” node, an option to recognize negative sign at the end could be useful

Hi @massic,

welcome to KNIME Community!

I would prefer having this read with a reader node as a number but maybe having this option in String to Number node isn’t bad idea.

Will forward it.

EDIT: Ticket for enhancement created.


1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.