Hi Dane,
I don't know the answer to your actual question, and am not sure I've thought this through properly, but maybe consider this as an alternative to sorting the input:
rule abc
[abc] 3..3 &{ |e| e[0].elements.map { |x| x.text_value }.uniq.size == 3 }
end
That is, match exactly three characters from the set {a,b,c}, remove the duplicates, then match the rule iff there are still three elements in the set. I think that matches the permutations of {a,b,c} and nothing else, which I think is what you want to do.
paul