I am trying to write a regular expression that matches factors of a polynomial. For example:
Of course these three factors can be in any order but cannot have duplicates.
This is what I tried:
But that doesn't allow for any order. I also need this to work with even more factors.