For a client I'm trying to find a GREL expression that helps me create a column with True
/False
values, depending whether a keyword occurring in column 1 exactly matches a full separate word in a longer text string in column 2. I don't know GREL or regex, and usually piece things together from examples, but can't figure this one out.
For an easier case (just matching the string), I have figured out (creating new column based on the existing keywords column): if(cells["Beschrijving"].value.find(value).length() > 0, "True", "False")
But I'd like to obtain the following results:
Trefwoord | Beschrijving | Match? |
---|---|---|
tand | Scherpe tanden | False |
dirigent | Eerst was ze dirigent, daarna chef-dirigent | True |
rivier | De Congo-rivier | True |
papyrus | De professor onderzocht het papyrus, en moest toen onbedaarlijk niezen | True |
school | School en werk | True |
What GREL to use to create the Match?
column for the examples above?
Help is much appreciated. Thank you!