Message266564
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:58 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rbcollins, ezio.melotti, r.david.murray, michael.foord, berker.peksag, martin.panter, maciej.szulik |
2016-05-28 17:31:58 | serhiy.storchaka | set | messageid: <1464456718.31.0.381276455071.issue27132@psf.upfronthosting.co.za> |
2016-05-28 17:31:58 | serhiy.storchaka | link | issue27132 messages |
2016-05-28 17:31:58 | serhiy.storchaka | create | |
|