Question: E.g. Any combination of these 3 words [AB,CD,EF] should pass the regex. Also, it should not allow duplicates.

Thanks.

Answer: 
I would not recommend a regex for this. But it is possible:

```
boolean foundMatch = subjectString.matches(
    "(?x)                  # Verbose regex:\n" +
    "(?!.*(AB|CD|EF).*\\1) # Make sure there are no dupes in the string\n" +
    "\\s*                  # Match optional whitespace.\n" +
    "(?:AB|CD|EF)          # Match one of the three candidates\n" +
    "(?:                   # Try to match...\n" +
    " \\s*,\\s*            #  a comma, optionally surrounded by whitespace\n" +
    " (?:AB|CD|EF)         #  followed by one of the candidates\n" +
    ")*                    # zero or more times\n" +
    "\\s*                  # Match optional whitespace.");

```
Well, the obvious solution is just to enumerate all 15 possibilities in a regex -- with a little work, you can probably factor out some terms and get a slightly more compact regex -- but there's not going to be another way to express those constraints in a regular expression.