Re: newbie parsing question

2006-03-25 Thread Paul McGuire
"Kun" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > i have a list of that is: > > [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend > <[EMAIL PROTECTED]>\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS (FROM)] {37}', > 'From: Kun <[EMAIL PROTECTED]>\r\n\r\n'), ')'] > > > how do i pa

Re: newbie parsing question

2006-03-24 Thread Fredrik Lundh
"Kun" wrote: > 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,

Re: newbie parsing question

2006-03-24 Thread Kun
[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/H

Re: newbie parsing question

2006-03-24 Thread raviteja . bhupatiraju
Use Regular expressions http://docs.python.org/lib/module-re.html -- http://mail.python.org/mailman/listinfo/python-list

newbie parsing question

2006-03-24 Thread Kun
i have a list of that is: [('460 (BODY[HEADER.FIELDS (FROM)] {46}', 'From: Friend <[EMAIL PROTECTED]>\r\n\r\n'), ')', ('462 (BODY[HEADER.FIELDS (FROM)] {37}', 'From: Kun <[EMAIL PROTECTED]>\r\n\r\n'), ')'] how do i parse the email addresses out of it into another list or string? -- http://mai