macromedia.coldfusion.getting_started
[Top] [All Lists]

Re: Parsing a tab delimited file

Subject: Re: Parsing a tab delimited file
From: "Dan Bracuk"
Date: Tue, 22 Apr 2008 13:03:13 +0000 UTC
Newsgroups: macromedia.coldfusion.getting_started

[q][i]Originally posted by: [b][b]jdeline[/b][/b][/i]
 Once you have the row in foo, you must deal with the empty list elements.  You 
can accomplish that by finding consecutive tab characters and inserting a space 
between them.  
 Something like <CFSET foo = Replace(foo, "#Chr(9)##Chr(9)#", "#Chr(9)# 
#Chr(9)#", "ALL")>.  You will want to do this twice to account for multiple 
empty list elements next to each other.
 [/q]
 I use a while loop to do this sort of thing.

 while (find(chr(9)chr(9)) gt 0 ) {
 replace
 }



<Prev in Thread] Current Thread [Next in Thread>