If you are going to use regular expressions to reduce whitespace, I'd 
probably use something like

rereplace(text, "\s+", " ", "all");

However, I would look carefully at whether this actually speeds up 
delivery.  Full-fledged regex engines are slow, and there are several 
faster replacement engines designed specifically for reducing the size 
of web pages.  Also, bandwidth is cheap.  :-)

--Ben Doom

Nate Willard wrote:
> hello,
> 
> I learned of of an issue with my whitespace reduction
> method that is almost funny.
> 
> I do the following to remove whitespace
> 
> <cfsavecontent variable="pageholder_tboutputed">
> PAGE CONTENTS.......
> </cfsavecontent>
> <cfset pageholder_tboutputed
> =REReplace(pageholder_tboutputed,
> "[[:space:]]{2,}","","ALL")> 
> <CFOUTPUT>#pageholder_tboutputed#</CFOUTPUT>
> 
> What ended up happening today is that one of the
> sources I pull in information from had double spaced
> between words. so instead of the "The bear went home"
> they had "The  bear  went home" which caused my method
> to output "Thebearwent home"
> 
> Is there any way around this? Or do I need to remove
> my whitespace method for the time being?
> 
> Thxs
> 
> 
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:297032
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