[New-bugs-announce] [issue3262] re.split doesn't split with zero-width regex
Matthew Barnett
report at bugs.python.org
Thu Jul 3 00:07:49 CEST 2008
New submission from Matthew Barnett <python at mrabarnett.plus.com>:
re.split doesn't split a string when the regex matches a zero characters.
For example:
re.split(r'\b', 'a b') returns ['a b'] instead of ['', 'a', ' ', 'b', ''].
re.split(r'(?<!\w)(?=\w)', 'a b') returns ['a b'] instead of ['', 'a ',
'b'].
----------
components: Regular Expressions
messages: 69134
nosy: mrabarnett
severity: normal
status: open
title: re.split doesn't split with zero-width regex
type: behavior
versions: Python 2.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3262>
_______________________________________
More information about the New-bugs-announce
mailing list