Hi knimefriends! We are working in a proyect but stucked in a regular expression. We are trying to replace this type of simbol “-” (dash / hyphen) but we can’t get the correct formula to make it work. Our main problem is that the database has this simbol alone and in other cases they are between other words, and we only have to replace the ones that are alone in a cell.
Hola knimeamigos! Estamos trabajando en un proyecto pero nos estancamos en una expresión regular. Estamos tratando de reemplazar este tipo de símbolo “-” (guion / guion medio) pero no encontramos la formula correcta para que funcione. Nuestro problema principal es que nuestra base cuenta con casos en los que estos se encuentran entre otras palabras y nosotros queremos reemplazar aquellos casos en los que se encuentran solos en una celda.
(queremos pasar de esto (marcado en rojo) a esto (marcado en verde) sin modificar estos (marcados en azul)
=> _
We tryed regexReplace($$CURRENTCOLUMNS$$, “-” , “_”) but doesn’t recognise the first term as a function (appears in green when it should be in red). We also tryed “\-” but the same thing happened.
I am moving your topic to the main AP forum so it will get more visibility. We have several RegEx pros around here, and I am sure one of them will be able to find a fix for you in short order. Cheers!
While this can surely be done via Regex, basically "^-$" literally means “-” as the whole value, therefore a simple check if the column value = “-” is enough (and probably faster), like @aworker did
Can this syntax be used on multiple columns at the same time ?
It seems they need to use it on multiple string columns.
I thought ‘if else’ can be used in string manipulations (multi column) but it gives me an error.