Lasso Soft Inc. > Home

[mm_wordcount]

Linkmm_wordcount
AuthorMiles Xx
CategoryString
Version8.x
Licensehttp://opensource.org/licenses/artistic-license.php
Posted05 May 2006
Updated30 Jun 2006
More by this author...

Description

This tag, courtesy of a lil help from the lasso community, computes the number of words in a given string.

Sample Usage

[mm_wordcount: -string='The Quickbrown Fox...']

or

[mm_wordcount: -string=(field:'somefieldvalue')]

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

(replace: ' - ', '') &
			(replace: ' , ', '') &
			(replace: ' & ', '') &
			(replace: ' ? ', '') &
			(replace: ' % ', '') &
			(replace: ' $ ', '') &
			(replace: ' # ', '') &
			(replace: ' @ ', '') &
			(replace: ' * ', '') &
			(replace: ' ! ', '') &
			(replace: ' > ', '') &
			(replace: ' < ', '') &
			(replace: ' / ', '') &
			(replace: ' \\ ', '') &
			(replace: ' { ', '') &
			(replace: ' } ', '') &
			(replace: ' [ ', '') &
			(replace: ' ] ', '') &
			(replace: ' | ', '') &
			(replace: ' = ', '') &
			(replace: ' + ', '') &
			(replace: ' ( ', '') &
			(replace: ' ) ', '') &
			(replace: ' _ ', '') &
			(replace: ' . ', '') &
			(replace: ' ...', '');
	
	return: (string_findregexp: #v_text, -find='(?:\\w+)')->size;
	
	/define_tag;
		
?>

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft