Kevin Marino wrote:
>
> "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"
>
> The RegEx line I am using is;
>
> <cfset FromEmailPos =
> ReFindNoCase("(From:')?[.]*[<]?([EMAIL PROTECTED](\.[\w_]+)+)",Message,1,True)
>
> The I can get the From Email from both lines, but believe this is definitely
> not an optimal RegEx for the "From" part. Anybody have suggestions as to how
> to improve.

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")>

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