Mike Amburn wrote:
> let's say i have a list of 100 elements. i want to break up the list
> every fifth element and store in an array. it would be like
> ListToArray(), except rather than a 1-to-1 list-to-array i want 5-1
> list-to-array.
>  
> any easy way to do that other than looping through and manually
> appending?

Maybe. You could try a regular expression.
Presumptions:
- current delimiters: ,
- pipe (|) not present

<cfset list = REReplaceNoCase(list,"(([^,]*,){4}[^,]*),","\1\|","All")>
<cfset array = ListToArray(list,"|")>
or something like this.

Jochem


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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