Hello,
I am trying to find a peer command to 'LIKE" in Column Expression node.
I am assuming it is regexmatcher, only I cannot get it to work to match the following text
“Iryna’s Tel (mob)”. The text must be literal, not a pattern. The text can be in the middle of a string or at the beginning.
\Qtext\E is not working. Please help.
Hi,
If you want to match any string containing “Iryna’s Tel (mob)”, then you can use this:
.*Iryna’s Tel \\(mob\\).*
Those two backslashes before each parenthesis are escape characters, one for the expression in the node and the other one for the regex.
Best,
Armin
Hello Armin,
This seems to work in Regex testers but not in the node. I am trying for those records that have this text, have word ‘Phone’ populated in a separate column.
Do I have the syntax correct?
if (regexMatcher(column(“Landlord/ Tenant”),".Iryna’s Tel \(mob\).")== true)
{“Phone”}
else {“unknown”}
I get “unknown” populated…
Hi Iryna.
Do you need to use Column Expressions in your workflow?
Maybe you can use Rule Engine node instead or as a additional step? There is an easy solution for LIKE functionality in it:
$text$ LIKE “Iryna’s Tel (mob)” => “Phone”
TRUE => “Unknown”
BR,
Alex
There are a lot of values I need to categorize and columns to create, so Column Expression works nice for it. Unless, it does not work well with regex…
OMG, I just got it to work. The issue was the syntax for the word true. It should be ‘True’, with ’ and title case.
The winning syntax ended up being:
if (regexMatcher(column(“Landlord/ Tenant”),". Iryna’s Tel \(mob\). ")== ‘True’)
{“Phone”}
else {“unknown”}
You got it!
RegEx are still tricky for me, so i usually find some workarounds )
Maybe this solution can also be helpful to you:
if (count(column(“text”), “Iryna’s Tel (mob)”) >0 ) {“Phone”}
else {“Unknown”}
BR,
Alex
You do not need to type “== true’” as the output of regexMatcher itself is a boolean.
So this will work fine:
if (regexMatcher(column(“Landlord/ Tenant”),".*Iryna’s Tel \\(mob\\).*")) “Phone”
else “unknown”
Best,
Armin
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.