Comparing the column values [Wildcard/Regex]

Hi,

I am unable to compare the column values as shown in the following table and place the results in another column.

Col1 contains a string and Col2 contains another string. I want to compare the string and place results in output-column if Col2 exists in Col1. In following case the output should be TRUE/YES.

Col1 , Col2 , Output
ABC , B ,
DEF , E ,
XYZ , Z ,

Thanks.

Hi @nikola_tesla ,
you can try the ā€œString Manipulationā€ node with the expression toBoolean(indexOf($Col1$,$Col2$ )>-1)

3 Likes

Hello @nikola_tesla
You can test a ā€˜String Manipulationā€™ node with the following code:

regexMatcher($Col1$, 
 	join( 
 		"(.*?(" ,
 		$Col2$ ,
 		")[^$]*)$"  
 	) 
)

I am assuming that your real data can be more complex :wink: . In this example you can find a case of use.

BR

4 Likes

Thanks, it worked. Thanks again. :slight_smile:

Thanks, it also worked, thank you for your time.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.