>> However your code probably wouldn't catch triple spaces,
>> in which case I'd write:
>>
>> <cfloop collection="#form#" item="field">
>> <cfset form[field] = reReplace(form[field],
>> "[[:space:]]{2,}", " ",
>> "all")>
>> </cfloop>
I tend to use reReplace(form[field],"[[:space:]]+"," ","ALL") for
this, rather than using {2,} ... knowing that this will catch
single-character entries, which means a single-tab will be converted
to a single space, whereas {2,} will only catch two or more tabs or a
tab followed by a space, etc... that is -- a single white-space
character won't be replaced with the desired space if it's not already
a space (tab, carriage return, etc). using {2,}
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211009
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54