>ArrayLen( REMatch( "\b\w+\b", YOUR_TEXT_VALUE ) )
Hmmm, that wouldn't correctly count the words in this sentence.
And of course, there's always the question of whether \w is including accented
characters (it usually doesn't, but sometimes can).
A quick and dirty way might instead be to split on whitespace:
ArrayLen( MyString.split('\s++') )
But that could also be incorrect - by including "non-words" like that
hyphen/dash back there, whilst also not treating the slash delimited hyphen and
dash as seperate words.
I guess how important these are depends on the actual use of the wordcount: is
it displaying a specific number, or is it just looking for a rough quantity?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:321826
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4