Maybe the "*" character is throwing it off.  Sorry, I might have given you a
bad example.

This is some code I have that works.  I set up an array and then convert it
to a list...

<cfset stuff_list = #arraytolist(stuff_new,"||Q||")#>

I can then pick items from that list, using a #location# index.

<cfset stuff1 = #listGetAt(stuff_list,location + 1,"||Q||")#>
<cfset stuff2 = #listGetAt(stuff_list,location + 2,"||Q||")#>
<cfset stuff3 = #listGetAt(stuff_list,location + 3,"||Q||")#>
<cfset stuff4 = #listGetAt(stuff_list,location + 4,"||Q||")#>


Jeff Britts
ColdFusion Engineer
e-Dialog


-----Original Message-----
From: Robyn Follen [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 9:58 AM
To: CF-Talk
Subject: RE: List w/" " delims


I've tried to user multiple characters as a list delimiter, but whenever I
then try to iterate through the list, specifying my delimiter, it doesn't
work.  E.g., When I have the following code,

<CFSET myList = "o|ne |*| t*wo |*| th|*ree">
<CFLOOP Index="listElement" List="#myList#" Delimiters="|*|">
<CFOUTPUT>
        #listElement#<BR>
</CFOUTPUT>
</CFLOOP>

I get:

o
ne 
t
wo 
th
ree

because it takes each item in the list of delimiters and checks for them
individually.  Has anyone any insight on how to loop through something with
a particular combination of characters for a delimiter?

Any help would be appreciated,
Robyn


-----Original Message-----
From: Jeff Britts [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 08, 2000 8:29 AM
To: CF-Talk
Subject: RE: List w/" " delims


You CAN use multiple characters as list delimiters...eg. "|*|".

I do it frequently to cut down on the chances that one of my list items
contains a delimiter.

Jeff Britts
ColdFusion Engineer
e-Dialog



-----Original Message-----
From: Billy Cravens [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 07, 2000 2:21 PM
To: CF-Talk
Subject: Re: List w/" " delims


Keep in mind that list delimiters can only be 1 character.

-- 
Billy Cravens
[EMAIL PROTECTED]


Eric Fickes wrote:
> 
> Got a List question for you.
> 
> I've got a text file that I need to parse and it's " delimited list, in a
> way.  The list format is this.
> 
> "Full Name" "Email Address" "Group List" "Login Name"
> "Demo user for startup" "" " 1;" "Demo"
> 
> I was hoping to somehow use " " as a delimeter, but that's not working.
> When I do that it takes out the spaces in the column names. I'd like to
take
> 
> "Full Name" "Email Address" "Group List" "Login Name"
> 
> and turn it into
> 
> Full Name,Email Address,Group List,Login Name
> 
> Any ideas?
> 
> E
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        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