[issue15537] MULTILINE confuses re.split

2014-10-29 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: not a bug -> duplicate superseder: -> re.sub confusion between count and flags args ___ Python tracker ___ ___

[issue15537] MULTILINE confuses re.split

2012-08-02 Thread Dave Abrahams
Dave Abrahams added the comment: Dang! Thanks, and sorry for wasting everyone's time on this. -- ___ Python tracker ___ ___ Python-bu

[issue15537] MULTILINE confuses re.split

2012-08-02 Thread Ezio Melotti
Ezio Melotti added the comment: See also #11957. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker ___ ___

[issue15537] MULTILINE confuses re.split

2012-08-02 Thread Matthew Barnett
Matthew Barnett added the comment: There are actually 2 issues here: 1. The third argument is 'maxsplit', the fourth is 'flags'. 2. It never splits on a zero-width match. See issue 3262. -- ___ Python tracker ___

[issue15537] MULTILINE confuses re.split

2012-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: re.split = split(pattern, string, maxsplit=0, flags=0) Split the source string by the occurrences of the pattern, returning a list containing the resulting substrings. If capturing parentheses are used in pattern, then the text of all groups in

[issue15537] MULTILINE confuses re.split

2012-08-02 Thread Dave Abrahams
New submission from Dave Abrahams: compare the output of $ python -c "open('/tmp/tst','w').write(100*'x\n');import re;print len(re.split('\n(?=x)', open('/tmp/tst').read()))" 100 with $ python -c "open('/tmp/tst','w').write(100*'x\n');import re;print len(re.split('\n(?=x)', open('/tmp/tst').