AnsweredAssumed Answered

Regular Expressions.

Question asked by Craig Ogden on Dec 6, 2018

I am trying to write a regular expression that matches factors of a polynomial. For example:

(x-5)(x+2)(x-1)

Of course these three factors can be in any order but cannot have duplicates.

This is what I tried:

^\(x-5\)|\(x\+2\)|\(x-1\)$

But that doesn't allow for any order. I also need this to work with even more factors.

Any ideas?

Outcomes