Regular Expression for Whole Word Selection in Regexmatcher at String Manipulation Node

Hi KNIME BI,

As I am not yet very experienced in Knime I have a problem with the regexmatcher function in the String Manipulation node which I cannot solve. I would like to match two columns in two tables that look like this:

Table 1:

Table 2

So, Table1 contains names and institutions ((faked) company, city and country, Table 2 includes some (faked) city names. I would like to select the correct city names from the institutions.

In my workflow, I use a Cross Joiner to join the values of the two columns. After this I use a String Manipulation node with the regexmatcher function and after this I used a Row Filter to select the “True” values.

The String Manipulation Node looks like this:

Code:

regexMatcher($Institution$,

join(

“(?i)(.*?(" ,

$City$ ,

")[^$]*)$”

)

)

The results look like this.

In line 1, 3 and 6 the regexmatcher has selected parts of a word and the result is an error. How can I avoid this error? How can I manipulate the reqexmatcher in a way that it selects only whole words and not parts of it? I have experimented a bit with the \b operator but as I am really no RegEx specialist, results were even worse. Please, can you help me? Thank you in advance.