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 <>
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.
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: <>
2016-05-28 17:31:58serhiy.storchakalinkissue27132 messages
2016-05-28 17:31:58serhiy.storchakacreate