the second line is to actually build a comma delimited list of all the values that are separated by the word _split_.
without this some of the entries are not separated as '_' seems to be being used as a separator. the second replace removes the '_' so as to give a list of all entries requiring to be extracted... If you do not wish to separate these out on the '_' character just omit the second line... "Thanks wouldn't have gone astray!!!" > Subject: RE: listtoarray? > From: [EMAIL PROTECTED] > To: cf-talk@houseoffusion.com > Date: Fri, 6 Jun 2008 08:11:45 -0500 > > Jarlath... > > What's the point of the second line? ListToArray allows you to specify a > delimiter, so just replace "_split_" with a delimiter other than ",". > > <cfset VARIABLES.TestList = Replace(VARIABLES.TestList,"_split_","|","all")> > <cfset variables.SplitTest = ListToArray(variables.TestList,'|')> > > -----Original Message----- > From: Jarlath Gallagher [mailto:[EMAIL PROTECTED] > Sent: Friday, June 06, 2008 6:04 AM > To: CF-Talk > Subject: Re: listtoarray? > > This will do it for you... > > I think!!! If you already have this resolved apologies... > > If not have fun.... > > <cfset variables.TestList = "qu_45_tb_45_split_0_split_q_67"> > > <cfset variables.TestList = replace(variables.TestList,"_split_",",","all")> > <cfset variables.TestList = replace(variables.TestList,"_",",","all")> > <cfset variables.SplitTest = ListToArray(variables.TestList,',')> > > <cfdump var="#variables.SplitTest#"> > > > Hi > > > > we have various string values like the following: > > > > qu_45_tb_45_split_0_split_q_67 > > > > we need to break this string down into 3 array elements and split it > > based on the string '_split_' > > > > if the listtoarray function used this actual sequence to break the > > string up then we would be given an array: > > > > elem[1] = qu_45_tb_45 > > elem[2] = 0 > > elem[3] = q_67 > > > > which is how we need it. but of course the listtoarray uses each > > string charaacter as a delimeter to break the string down and > > therefore doesnt produce what we need > > > > is there an alternative that we can use that will break this down > > based on the entire sequence '_split_' > > > > we have looked through the livedocs and are sure this is achievable > > through the uses of 2 or 3 functions but cannot worj out quiet how to > > do it > > > > thanks for your help > > > > richard > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306954 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4