This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年03月10日 03:08 by Ramchandra Apte, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg155286 - (view) | Author: Ramchandra Apte (Ramchandra Apte) * | Date: 2012年03月10日 03:08 | |
help(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." No info is given about behaviour with groups in pattern. Created because of http://bugs.python.org/issue14236#msg155283. |
|||
| msg155288 - (view) | Author: Ramchandra Apte (Ramchandra Apte) * | Date: 2012年03月10日 03:10 | |
Oops. The link in the last sentence doesn't work. It should be see msg155283 . |
|||
| msg155297 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年03月10日 08:23 | |
New changeset b96251d9f36a by Georg Brandl in branch '3.2': Closes #14244: add info about capturing groups and maxsplit to the docstring of re.split(). http://hg.python.org/cpython/rev/b96251d9f36a |
|||
| msg155298 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2012年03月10日 08:24 | |
Thank you, should be fixed now. |
|||
| msg155299 - (view) | Author: py.user (py.user) * | Date: 2012年03月10日 08:42 | |
"+ returning a list containing the resulting substrings. If + capturing parentheses are used in pattern, then the text of all + groups in the pattern are also returned as part of the resulting + list." not only text >>> import re >>> re.split(r'(a)(x)?', 'abcabc') ['', 'a', None, 'bc', 'a', None, 'bc'] >>> |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:27 | admin | set | github: 58452 |
| 2012年04月29日 05:17:35 | ezio.melotti | set | stage: resolved type: enhancement versions: + Python 3.3 |
| 2012年03月10日 08:42:14 | py.user | set | messages: + msg155299 |
| 2012年03月10日 08:24:22 | georg.brandl | set | nosy:
+ georg.brandl messages: + msg155298 stage: resolved -> (no value) |
| 2012年03月10日 08:23:28 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg155297 resolution: fixed stage: resolved |
| 2012年03月10日 04:52:48 | py.user | set | nosy:
+ mrabarnett, py.user, ezio.melotti components: + Regular Expressions versions: + Python 3.2 |
| 2012年03月10日 03:10:49 | Ramchandra Apte | set | messages: + msg155288 |
| 2012年03月10日 03:08:21 | Ramchandra Apte | create | |