Hi @yoshiki3 ,
For your specific example (in both your questions) I would probably opt for the Rule Engine approach.
If you are still looking for an alternative, you can use the “almost undocumented” syntax of the String Manipulation node to achieve the desired result.
i.e. Assuming you have a table with “column1” containing your data, then the following in String Manipulation would also return the required result:
regexMatcher($column1$,"20.*|11.*|22.*" ).equals( "True" )
?"E"
:regexMatcher($column1$,"23.*|24.*" ).equals("True" )
?"L"
:"NA"
I think it can also be written as
regexMatcher($column1$,"20.*|11.*|22.*" ) == "True"
?"E"
:regexMatcher($column1$,"23.*|24.*" ) == "True"
?"L"
:"NA"
The syntax for the conditionals is as follows:
condition
? result-if-true
: result-if-false
In this case it says that if the column matches the regex beginning 20, 11 or 22, then return “E” otherwise if it matches the regex beginning 23 or 24 return “L” otherwise return “NA”