As i'm sure 50 people will tell you, "=newmessage=" in this case is your
list of single character delimiters. Hence, a string like "THe RaIn "
becomes a list of 4 elements: "TH"," R", "I", " ".

You probably want to replace the string "=newmessage=" globally with a
non-printable control character, then use that as your delimiter. You can
always change it back after you're done processing.

Michael Caulfield

-----Original Message-----
From: Kay Smoljak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 10:02 AM
To: CF-Talk
Subject: textfile parsing


Hi all,

I'm trying to parse the contents of a text file, with the ultimate aim of
putting the data in a database table. The text file contains email messages
(which may contain html code), with each new message beginning with the text
'=newmessage=' (minus quotes). I'm trying to use the listappend function
like this:

<cfset agentlist = listappend("agentlist", uploadedagentfile,
"=newmessage=")>

to split the file into individual messages. But, it doesn't seem to be using
the specified delimiter to split the messages. In fact I'm not sure what
it's using. The test file contains three messages but when I try to use
listtoarray and output the array there are 700 odd elements!

Any idea what's going on here? Any better way to do it?

Thanks,
Kay.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to