A sentence is effectively a space-delimited list of words.

So just do ListLeft(myvar,5,' ')

However, words can be an unpredictable length, so this might not be exactly 
what you want.

Here's some code that will give the first 100 characters, keeping words whole, 
and adding a html ellipsis onto the end:

<cfset summary = rereplace( text , '^(.{1,90}\w{1,10})\s.*$' , '\1&hellip;' ) />

Just change the 90 to 20 or 25, strip the &hellip; part, and it should do what 
you want.




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

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321625
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