I'm looking for a regex to validate a set of non repeating characters separated by commas.
Given the set of characters like ABCD
Match any comma separated permutation (no repeating characters)
Some matches would be:
A
C
C,B
B,D
D,B,A,C
Some no matches would be:
A,A
ABC
D,B,A,B
This would work but doesn't allow the commas:
\b(?!(?:.\B)*(.)(?:\B.)*\1)[ABCD]+\b