> <cfset URL.Group = REPLACE(URL.GROUPS, RIGHT(URL.GROUPS, 1),'')>
Bruce- Looks like that code's telling CF to replace the first occurrence of right(url.groups,1), which is a comma. So your results are that the first comma in your string is being replaced. I suspect what you actually want is to use left() Something along these lines should do the trick: myVar = left(trim(myVar), len(trim(myVar))-1) -Cameron On 4/24/07, Bruce Sorge <[EMAIL PROTECTED]> wrote: > I have a query that is getting a string for the WHERE clause from the a URL > variable, and I am building the URL variable in JS on the form submit. What > happens is that the JS puts a comma at the end of the string. No big deal. I > figured that I would just use the RIGHT function to rebuild the string on > the submitted page, stripping the comma off the end. However, it is not > working. The original string looks like this: > > 3, 4, 5, 6, > > When I do this: > > <cfset URL.Group = REPLACE(URL.GROUPS, RIGHT(URL.GROUPS, 1),'')> > > I get 3 4, 5, 6, > > I am not sure why this is happening. The only thing that I can think of is > that the space between the comma and number is making CF think that 3, is > the end of the string. Does this sound correct? > > Thanks, > > -- > Bruce Sorge > > "I'm a mawg: half man, half dog. I'm my own best friend!" > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 and Flex 2 Build sales & marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276153 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

