[EMAIL PROTECTED] wrote: >>>> string = 'abababababababab' >>>> pat = 'aba' >>>> [pat for s in re.compile('(?='+pat+')').findall(string)] > ['aba', 'aba', 'aba', 'aba', 'aba', 'aba', 'aba']
Wow, I have no idea how to read that RE. First off, what does it match? Should something come before the parentheses, and that will be what matches? Also, what are the '+'s doing? Are they literal +s or still being used as RE syntax? -- http://mail.python.org/mailman/listinfo/python-list