[EMAIL PROTECTED] wrote:
> Use Regular expressions
> http://docs.python.org/lib/module-re.html
> 
i tried to parse (below) with the regular expression: emails = 
re.findall('\S*\s([EMAIL PROTECTED])', senders)

and got the following error:

Traceback (most recent call last):
   File "/Life/School/Homework/Spring 2006/OPIM 
399/Tutorial/IMAP/scannermailer.py", line 19, in -toplevel-
     emails = re.findall('\S*\s([EMAIL PROTECTED])', senders)
   File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/sre.py", 
line 167, in findall
     return _compile(pattern, flags).findall(string)
TypeError: expected string or buffer


any help would be appreciated.








[('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Kevin Feng 
<[EMAIL PROTECTED]>\r\n\r\n'), ')', ('461 (BODY[HEADER.FIELDS 
(FROM)] {37}', 'From: Kevin <[EMAIL PROTECTED]>\r\n\r\n'), ')']
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to