[docs] [issue17668] re.split loses characters matching ungrouped parts of a pattern

R. David Murray report at bugs.python.org
Mon Apr 8 21:30:05 CEST 2013


R. David Murray added the comment:

>>> re.split('-', 'abc-def-jlk')
['abc', 'def', 'jlk']
>>> re.split('(-)', 'abc-def-jlk')
['abc', '-', 'def', '-', 'jlk']

Does that make it a bit clearer?  Maybe we need an actual example in the docs.

----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python
stage: committed/rejected -> needs patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17668>
_______________________________________


More information about the docs mailing list