How to remove matched words of two lists from one of the list
Hi All!
I have a dataset that has two columns. each column has a list of words separated by ",". I want to compare two columns and if any word is present in both columns, that should be replaced/removed from the second list.
Source:
list1 list2
asd,ad bd,ghi jkl,bd,ghi
ui,ki lm,po op,ki,ui
Required output:
list1 list2
asd,ad bd,ghi jkl,bd,
ui,ki lm,po op,ki,
I have used regexp_replace but it is replacing substring also---it has to compare exact word match.
Even I tried with split, loop attribute and inside generate attribute used to replace/replaceAll with macro value----it's throwing error.
could anyone help me to resolve this?
Thanks in advance!