I have the following 2 fields. Field1 is populating with a list of fruits separated by a pipe. The list for each row could be variable length. Field2 should be the same length as Field1 but replace whatever specific fruit is listed with just "Fruit".
Right now I am solving by having multiple REGEX_CountMatches formulas for the various possibilities (IF REGEX_CountMatches([Field1], '\|')=3 THEN "Fruit|Fruit|Fruit|Fruit...), and it works fine, but would like to make it more dynamic since the list could grow.
I have tried multiple versions of a REGEX_Replace and nested REGEX_Replace formula (IF REGEX_CountMatches([Field1], '\|')>0 THEN REGEX_Replace([Field1], ".*\|.*", "Fruit\|Fruit") ELSE "Fruit" ENDIF) but again the variable length of the lists is causing issues. Guessing I am not using the Meta Characters correctly, but am not experienced enough to utilizes them in a way that will work.
I appreciate the help and thoughts on how to solve. Thank you!
1st 2 columns is data set with 3rd being desired results:

not correct, but the best I have gotten so for:
