Hello,
i am trying remove the last Number/Character of a Column.
I have a list of IP-Adresses, e.g.
10.20.100.1
10.20.101.1
10.30.200.1
etc.
I want to change the last digit to a zero but how?
Thanks in advance.
Hello,
i am trying remove the last Number/Character of a Column.
I have a list of IP-Adresses, e.g.
10.20.100.1
10.20.101.1
10.30.200.1
etc.
I want to change the last digit to a zero but how?
Thanks in advance.
Hi there @Belvedere,
welcome to KNIME Community Forum!
Using String Manipulation node with this formula should replace last character with 0:
join(substr($column1$,0,length($column1$)-1),"0")
If you know regex you can use it as well
Br,
Ivan
(… but if the OP is talking about making the last octet 0, maybe for doing masks (e.g 1.2.3.45 -> 1.2.3.0) then in this regex you’d need do something else like ..., "\\.\\d+$", ".0")
)
Thank you !
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.