Kevin Marino wrote:
> From: Jochem van Dieten [mailto:[EMAIL PROTECTED]

>>>"Information","scheduler-0","12/29/03","15:41:19",,"Mail: 'Report Examines
>>>U.S. Long-Term Care Spending' From:'John Noone <[EMAIL PROTECTED]>'
>>>To:'[EMAIL PROTECTED]' was successfully sent using 192.168.5.186"
>>>"Information","mailWorker-3","12/29/03","15:56:34",,"Mail: 'FDA Sounds
>>>Alarm
>>>Over Hospital Bed Fires' From:'[EMAIL PROTECTED]'
>>>To:'[EMAIL PROTECTED]'
>>>was successfully sent using 192.168.5.186"

>> First, treat the log file as a Chr(13) delimited list, that will
>> break the log into individual messages. Then, if you only use
>> canonical email addresses, it should be as simple as:
>>
>> <cfset from = REReplaceNoCase(line, "^.*From:'([^']*)'.*$","\1")>
>  
> that helps,  I now get "John Noone <[EMAIL PROTECTED]>"  but I also need to
> extract the actual email address from between the "<>" also they are
> optional.

<cfloop list="#log#" index="line" delimiter="#chr(13)#">
   <cfset from = REReplace(line, "^.*From:'([^']*)'.*$","\1")>
   <cfset email = REReplace(from, "^.*<([^>]*)>.*$","\1")>
</cfloop>

Jochem

--
I don't get it
immigrants don't work
and steal our jobs
     - Loesje
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to