I have 7 items…
a b c d e f and g
The seven items can be in any order. How to I check with regex that they are there (or not) but no other items are…
^(a)?(b)?(c)?(d)?(e)?(f)?(g)?$
Thad would check for the seven items with any combination of items missing, but only in that order. How do I have the regex check for any possible order of the 7 items?
Both of these would pass:
abcdefg
aceg
I need these to pass as well
bc
fabcd
bgef
I’m using single letters to simplify things. For example (\stest)? would be an example of one of the items (\skey="([^"<>]+)?")? is another… I would like to prevent duplicates as well.
These should not pass
abca
aa
gfdef
Something like this would work: