>>><cfset thelist ="aa,bb,cc,dd,ee,ff,uu,vv,ww,xx,yy,zz"> > >What would be the most efficient way to split the list into two lists, > >Try this : ><cfset thelist ="aa,bb,cc,dd,ee,ff,uu,vv,ww,xx,yy,zz"> ><CFSET st = REFind ("([^\,]*\,){6}", thelist, 1, true)> ><CFSET list1 = mid(theList, 1, st.len[1]-1)> ><CFSET list2 = mid(theList, st.len[1]+1, 9999)> ><CFOUTPUT> >list1 = #list1#<BR> >list2 = #list2#<BR> ></CFOUTPUT>
I've been looking for this for long now. What happens when you have a list containing coma-delimited numbers, say "1,2,3,4,....X" Where "X" is a number below 5000. How do you split this list into equal lengths of 100? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327084 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4