[New-bugs-announce] [issue15537] MULTILINE confuses re.split

Dave Abrahams report at bugs.python.org
Thu Aug 2 16:58:57 CEST 2012

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()))"


$ python -c "open('/tmp/tst','w').write(100*'x\n');import re;print len(re.split('\n(?=x)', open('/tmp/tst').read(), re.MULTILINE))"

components: Regular Expressions
messages: 167228
nosy: dabrahams, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: MULTILINE confuses re.split
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list