How can I write: many times in opentype code

How can I write: many times, in opentype code
I dont know is it possible or not
for example I want to write not matter how many @B is between @A and @C
even if there is 10 then make it change 10 times

sub @A [@B]' @C by [@D];

You cannot. You can define multiple rules with one, two, three, etc. occurrences.