Isn't re.findall supposed to find all?

June Kim junaftnoon at nospamplzyahoo.com
Fri Nov 10 18:08:26 EST 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