in reply to Operator for "these expressions, in any order"

You can combine a couple of near-solutions:

/^(?=.*X)(?=.*Y)(?=.*Z)(X|Y|Z){3}$/

If X, Y, and Z are distinct enough, then this should be a total solution. If, for example, X is a subpattern of Y, then it would match YYZ.

- tye        

Replies are listed 'Best First'.
Re: Re: Operator for "these expressions, in any order" (both)
by jsalvata (Initiate) on Feb 17, 2004 at 23:34 UTC
    Excellent! In my case, X, Y Z... are definitely unmistakable.

    I'll just need to check this for performance (yes, just to make my problem more difficult, performance is also very relevant). Fortunately I have something more restrictive to use in lieu of the ".*"...