Trying to remove duplicate values and trim commas in the same cell using regex replace. I am pretty close and keep trying to tweak the formula but am having no luck. Below is the current formula I am using, and the current vs desired output. I would like to use regex replace if possible as I am using this in the multi-field formula tool due to applying to many columns.
TRIM(REGEX_Replace([_CurrentField_], '(-?\d+(?:[.,]\d+)?),(?=.*\1)', ''), ',')
Below is some sample data. Cells have multiple values separated by commas.
Original Data:
| 0,0,67,67,0 |
| -30,-30 |
| 0.03,0.045,0.03,0.03,0.045,0.045 |
| 1.17,0.37,0.36 |
| 1.0588,0.8125,1.3586,1.3586 |
Current output:
| 67,0 |
| -30 |
| 0.03,0.045 |
| 1.10.37,0.36 |
| 1.0580.8121.3586 |
Desired output:
| 67,0 |
| -30 |
| 0.03,0.045 |
| 1.17,0.37,0.36 |
| 1.0588,0.8125,1.3586 |