greetings list,

I need to count the words in a textarea and validate client side that it 
doesn't exceed a certain number.

We have been trying to use regular expressions to count the words.  Is 
there a way to count the words in a string and return the number of words 
to test against this value.  We would then trim out the extra words and 
send them back to the form.

We have it working using indexOf and only checking for spaces, but run into 
problems when there are tabs in the textarea.

thanks and kind regards,
Jeffrey


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase Contribute 3 from House of Fusion, a Macromedia Authorized Affiliate 
and support the CF community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=53

Message: http://www.houseoffusion.com/lists.cfm/link=i:21:864
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to