Then, to match zero, one or two sequences of a comma and one of the 3 allowed chars, you need a grouping construct: (,[SCE]){0,2} or, with a non-capturing grouping construct, (?:,[SCE]){0,2}.

To make sure there are no repeating chars, use a negative lookahead anchored at the start that will fail the match once the same char is found - ^(?!.*([SCE]).*\1) - where ([SEC]) is Group 1 and \1 is the backreference referring to the value captured in this group (either S, E, C)