Nick, Try #reReplace(cgi.query_string, '&Term=[a-z]', '', 'all')#
G Read -----Original Message----- From: Nick Sweeney [mailto:[email protected]] Sent: Wednesday, 1 July 2009 2:04 AM To: cf-newbie Subject: Replace a URL variable Hi everybody - having a brain fart today - this should be easy but I can't get my head around it. I want to replace a URL variable with a new one, rather than have it duplicate it. (List it twice) I have a page/cfc that has "Letters" for aplha numericically sorting a list - that I pass through the URL. I include it in a page like so: <CF_AlphaSort AlphaPage="#CurrentPage#?#CGI.QUERY_STRING#" Filter="Sort Name"> Which streams in links that look like this : <CFPARAM NAME="ATTRIBUTES.AlphaPage" DEFAULT=""> <CFPARAM NAME="ATTRIBUTES.Filter" DEFAULT=""> <CFPARAM NAME="URL.Term" DEFAULT=""> <div id="AlphaList"> #ATTRIBUTES.Filter# Filter: <a href="#ATTRIBUTES.AlphaPage#&Term=a">A</a> <a href="#ATTRIBUTES.AlphaPage#&Term=b">B</a> ...etc </div> The problem here is that the SECOND time someone uses the list (sorts twice) it makes a URL like this: www.WEBSITE.com/WEPPAGE.cfm?&Term=a&Term=b And I only want it to list ONE Term in the URL - rather than ADDING terms. (in that example above - term=b ONLY not "a,b" My guess is that I need to use ReplaceNoCase() - but I am not sure how to "wildcard" the "term value" I need to use the CGI.QUERY_STRING because it is common that I will need the OTHER variables I passed to the page. Thoughts? Thanks, - Nick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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-newbie/message.cfm/messageid:4608 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
