What is your goal?
I need to convert a space-separated string of numbers (e.g. “1 2 3”) into a pipe-separated string (e.g. “1|2|3”) to use as a regex alternation pattern in a Text Parser module.
What is the problem & what have you tried?
In a SetVariable (util:SetVariable2) module, I’m using replace(871.$2; " "; “|”) where 871.$2 contains “1 2 3”. The module returns “1 2 3” unchanged — the pipe character is never substituted. I also tried replace(871.$2; " "; “|”) with quotes, join(split(871.$2; " "); “|”), and putting the replace() directly in the Text Parser pattern field. None of these worked. The replace() works fine with other characters like comma, but not with pipe.
