Sorry I misunderstood what he was going for. Without column headers I assumed the first column of numbers were the page numbers.
Tim Heald ACP/CCFD :) Application Development www.schoollink.net > -----Original Message----- > From: Seth Petry-Johnson [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 03, 2002 9:22 AM > To: CF-Talk > Subject: Re: Create dropdown selection from external files > > > > You could also treat it like two lists right? > > You could definately use the list functions to loop through line by line > (using a CRLF as the delimiter as your code did), but you would encounter > two main problems with parsing out the line numbers: > > 1) Not every line in the file contains the same format of data, > so the list > functions would choke on lines that did not contain the folio data (for > example, the "S U M M A R Y O F F O L I O S / L E A D" header). To be > safe you'd need to compare each line against a regular > expressions anyway to > make sure that it is a line you wanted to process, so it just > makes sense to > use regular expressions from the get-go. > > 2) Each parseable line contains a string like so: > 001>folio: 165 . . . 011.50 points free > It was my understanding that the posted wanted the "165" part of that > string, NOT the "001>" part. It looked to me like your code would treat > each line as a ">" delimited list and would grab the first element in that > list which would be the "001" part. > > If this WAS the desired result then your function would work > great, although > I would first validate that the line was well-formed: > > <cfloop from="1" to="#listLen(sIN, delimiter)#" index="i"> > <cfset temp = listGetAt(sin,i, delimiter)> > <cfif ListLen(temp, ">") EQ 2> <!--- make sure the line is > well-formed ---> > <cfset arPages[i] = listGetAt(temp, 1, ">"> > </cfif> > <cfloop> > > Regards, > Seth Petry-Johnson > Argo Enterprise and Associates > > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. 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

