Hello all,

I have a text file that's a save of a bunch of messages from Outlook.  The
messages are error reports from CF sent with CFMail.  The formatting sucks -
I never expected to get a bunch - I was using it for debugging.. anyway, I
have several hundred I need to parse.  Silly transaction logs....

The layout is below.  What I need to do is get the datetime string and the
message ID from each instance of an error message in that file so I can
update our database.

---- start 'record' -----

                                        x:\inetpub\domain\subdir\errorfile.cfm<p>

                                        DateTime: {ts '2002-01-06 00:44:09'}<p>

                                        URL Message_ID: 23660 <p>


                                Message: ODBC Error Code = 37000 (Syntax error or 
access
violation)<P><p>
                                Detail: [Microsoft][ODBC SQL Server Driver][SQL 
Server]The log file for
database 'dsdb' is full. Back up the transaction log for the database to
free up some log space.<P><P>

---- end 'record' -----

The file has this format several hundred times over.

Reading it in with cffile is simple.  What I can't figure out is how to
write the pattern matching code to extract the two variables.  Also, the
logic to make sure I have matching pairs is pretty easy - it's just the
RegExps that are killing me.

This is probably simple; I could write this in Perl but can't seem to do it
in CF.

Thanks in advance,

Jeff
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to