Re: counting w*rds
Re: counting w*rds
- Subject: Re: counting w*rds
- From: Dennis Wurster <email@hidden>
- Date: Tue, 22 May 2001 16:55:11 -0400
On 5/22/2001 1:03 AM, Ehsan Saffari (email@hidden) wrote:
>
There are many characters that AS considers a word:
>
>
set x to "****"
>
count words of x -->4
>
>
how can I count the words in a string while
>
ignoring a special character like "*" using vanilla AS:
>
>
set x to "****"
>
count words of x -->me needs 1
Isn't there a way to tokenize the string, having each word be a token?
then just count the tokens.
>
>
and on a similar note, how to count the occurances of a substring in a
>
string?
I'd use a RegEx osax and develop a regular expression. Or, for vanilla
AS, leverage the power of BBEdit, which can do the regex searching for
you with its grep search.
-=Dennis=-
------------------------
Dennis Wurster
Senior IT Specialist
Infantino Associates