I have produced a data set with codes separated by pipe symbols. I realized there are many duplicates in each row. Here are three example rows (the regex is applied to each row individually in KNIME)
0612|0613|061|0612|0612
0211|0612|021|0212|0211|0211
0111|0111
0511|0512|0511|0511|0521|0512|0511
I am trying to build a regex that removes the duplicate code numbers from each row.
I tested \b(\d+)\b.*\b\1\b
from a different thread here but the expression does not keep the other codes. The desired outputs for the example rows above would be
0612|0613|061
0211|0612|021|0212
0111
0511|0512|0521
Appreciate your help