[python-win32] help with parsing email

James Matthews nytrokiss at gmail.com
Thu Aug 14 18:25:30 CEST 2008


It seems very simple split it and then rfind to the first slash and slice
the rest.

On Thu, Aug 14, 2008 at 9:19 AM, Tim Golden <mail at timgolden.me.uk> wrote:

> Ahmed, Shakir wrote:
>
>> I need to grab/parse numeric numbers such as app number from incoming
>> emails stored in Microsoft Outlook (Microsoft Exchange server) with
>> specified subject line.
>>
>
>  The email body is like this
>>
>>
>> myregion ; tst ; 11-Aug-2008
>>
>>
>> http://my.xyz.com/dddd/content/ifs/apps/myDocFolder/NoticeOfapplication/080612-21_test_337683.pdf
>>
>
>
>> I need to extract 080612-21 _ number from above line from incoming emails.
>>
>>
> You're underspecifying this a bit. Are you asking for
> help with reading emails? Or with finding a number in
> a load of text?
>
>
> The answer to the first is: use COM to automate Outlook/CDO.
>
> The answer to the second is probably to use a simple regex.
> Unless the format is so simply specified that you can
> just use split () and string slicing.
>
> TJG
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>



-- 
http://www.goldwatches.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080814/7f373e0e/attachment.htm>


More information about the python-win32 mailing list