Isn't re.findall supposed to find all?

June Kim junaftnoon at nospamplzyahoo.com
Sat Nov 11 00:08:26 CET 2000


>>> z='abcde[abcdefrdofhd]kdeioslkdfj[sdkfj]dkj'
>>> p=re.compile('(\[.*\])')
>>> result=re.findall(p,z)
>>> result
['[abcdefrdofhd]kdeioslkdfj[sdkfj]']
>>> 

I expected something like ;
['[abcdefrdofhd]','[sdkfj]']

The chances are I've done something wrong, but can't
tell what it is yet. What do you say?

Best regards,

June.




More information about the Python-list mailing list