>>> 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.