i have a problem, and i can´t wrap my head around how to solve it.
My data looks like this:
I want to replace the whole cell, which includes /F with a “?”.
I tried the string replacer node with a regular expression: "str=str.replaceALL(“0/F”) with the replacement text “?”. This does not work.
I also tried the string manipulation node with this expression: regexReplace($Col1$,"[/F]" ,"?" ).
This does not work either.
Anyone some tips or improvements?
Thanks in advance!
Did you try the String Manipulation node with:
replace($column1$,"/F" ,"?" )
Yes I tried it and it works, but only partially.
It replaces the /F with an “?”.
But in the case when the “/F” is behind a Number, it only replaces “/F” and not the whole cell.
/F = ?
0,22/F = 0,22
Thanks for the suggestion!
what you need is checking if your column contains /F.
I suggest in this case a Rule Engine Node with…
$s$ LIKE “*/F*” => “?”
TRUE => $s$
However, there can be other approaches (i.e. Regex) which should also solve your problem.
I agree with @tommy. Here is a single line expression (in the Rule Engine node):
$column1$ MATCHES "[\d\.]+" => $column1$
Using this expression, if the value contains only digits and dot, then it returns the same value, else it returns missing value (?).
Hi there all,
don’t have anything against regular expressions but I prefer wildcards if they are sufficient.
So expression in Rule Engine that does the job using wildcards would be like this:
NOT ($column1$ LIKE "*/F*") => "$column1$"
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.