Repeat action help

Hello,

Okay I will do it with a current example.
Just take a note : for now I have just a little concatenation of string, but it could be a lot more in the future.

I have multiple columns, and after applying multiple rules, I have one field with multiple strings inside, separated with a comma :
image
This string could become a lot bigger than that.

Depending on the values present inside this concatenate string, we have to make a selection rule, finally get only one word inside this string.
Of course, for now I can use a rule action to perform my needs, but I would like to make an if statement.
Why ?
Because actually, it could have only a little number of values.
But, if tomorrow I have 50 values, I don't want to have a statement like :
"if [Data] contains "a text" and contains "a other text" and contains "an other" and contains "an other"....."
I would like to remove the different text values, depending on conditions, to remove step by step the unwanted values.

For example in the code below, in the first case, I want to remove the "NOT LISTED" value, if the [Data] contains "DUAL USE".
It works, but if I do that, the rest of the if statements are not applied.
-> Same with the action "rules", if the first statement is applied, the others are not.
That's why I would like to do a repeat on this action, to remove a text on condition, repeat it, remove an other text with an other condition, 50 times if needed, until I know I can't have more than one value in the result.

if( contains([Data], 'DUAL USE') and contains([Data], 'NOT LISTED'),
    removetext([Data], 'NOT LISTED'),
    if(contains([Data], 'DUAL USE'),
        'DUAL USE',
        if( contains([Data], 'LISTED'),
            'LISTED',
            if( contains([Data], 'NOT LISTED'),
                'NOT LISTED',
                if( contains([Data], 'NOT ASSESSED'),
                    'NOT ASSESSED',
                    [Data]
                )
            )
        )
    )
)

Of course in last condition, it must have a last validated value, which will become the only value in the field.

@Perk in response to :
If your list can have different lengths and you are trying to loop or repeat an action, how would you know when you want it to stop? Or how would you know you have found the correct substring?

-> The values are not always in the same order, but I know every possible values that could be the "last" value. So I can say "if the value is only that, so the value stay that".

It's like a for loop :

counter = 0;
for (i = 0, i<10, i++) {
  counter ++;
  if (counter > 2){
    counter = 2;
  }
}

I can repeat the action 10 times or 100000 times if I want, the result will be the same at the end, because of my last condition.

I want to repeat X times the process on my field, and if there is only 1 value in the result, I keep this value.

I hope it's more clear with these examples.