[New-bugs-announce] [issue6663] re.findall does not always return a list of strings

Phillip M. Feldman report at bugs.python.org
Fri Aug 7 08:00:14 CEST 2009


New submission from Phillip M. Feldman <pfeldman at verizon.net>:

As per the Python documentation, the following regular expression should
produce a list containing the strings '6.7', 7.33', and '9':

re.findall('(-?\d+[.]\d+)|(-?\d+[.]?)|(-?[.]\d+)', 'asdf6.7jjjj7.33ff9')

Instead, it generates a list of tuples.  Either the documentation should
be changed to make it consistent with what re.findall is actually doing,
or, better yet, re.findall should be fixed.

----------
components: Regular Expressions
messages: 91393
nosy: pfeldman at verizon.net
severity: normal
status: open
title: re.findall does not always return a list of strings
type: behavior
versions: Python 2.5

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


More information about the New-bugs-announce mailing list