This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients berker.peksag, ezio.melotti, maciej.szulik, martin.panter, michael.foord, r.david.murray, rbcollins, serhiy.storchaka
Date 2016-05-28.17:31:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464456718.31.0.381276455071.issue27132@psf.upfronthosting.co.za>
In-reply-to
Content
The simple way is just write all possible variants ('ENABLE.*NOAUTH|NOAUTH.*ENABLE').

The general way is to use itertools.permutations():

    pattern = '|'.join(map('.*'.join, permutations(map(re.escape, strings))))

See also similar problem in issue19681. The first my patch used permutations(). But there was committed the patch with manually written variants.
History
Date User Action Args
2016-05-28 17:31:58serhiy.storchakasetrecipients: + serhiy.storchaka, rbcollins, ezio.melotti, r.david.murray, michael.foord, berker.peksag, martin.panter, maciej.szulik
2016-05-28 17:31:58serhiy.storchakasetmessageid: <1464456718.31.0.381276455071.issue27132@psf.upfronthosting.co.za>
2016-05-28 17:31:58serhiy.storchakalinkissue27132 messages
2016-05-28 17:31:58serhiy.storchakacreate