Remove/Replace special character "\" in column

Hi there,
I’m new here and I’ve looked at other topics looking to solve my problem, I found some solutions but I couldn’t apply.

I have a table with several columns and in 4 of them I have inside a string, the character “”.

When I try to return to DB it crashes.

I need to find and replace the “” with “-” but the solutions I’ve found here, so far don’t understand the “” as part of the string, but as a system character apparently.

Can anyone help me?

Hi @alessandrobruno and welcome to the KNIME community!

The “\” character is often used as escape character, which might lead to some confusion. For example, take a closer look at your post, there’s no occurence of it! (only in the header :grin:) Here it’s because the forum engine and its functionalities. There’s an easy fix for it: Using “\” twice escapes the escape character: \\.

The exact solution depends on your data type, but you can try this bit in a String Manipulation Node:

replace($yourColumnGoesHere$, "\\", "-")
7 Likes

String Manipulation Node, also column expression node

Hi Thyme,

tks for your repply, i am trying to put it to work at this morning and come back with the results soon.

Tks.

2 Likes

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