;) indeed - my linguistic point was pretty lame, regretted it as soon as I
posted it. With more useful names and a ditching of the x = y; return x;
sillyness, you're right, it could still be useful in more complicated code:

<cfscript>
var stringInTransit = arguments.stringToChange;
var cleanString = "";

stringInTransit = rereplace(stringInTransit,'[_| ]','-','all');
stringInTransit = rereplacenocase(stringInTransit,'[^a-z|A-Z|0-9|-]','','all');
cleanString =  rereplace(stringInTransit,'[-]+','-','all');

return cleanString;
</cfscript>

Dominic

-- 
Blog it up: http://fusion.dominicwatson.co.uk


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301376
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to