Re: find repeated sub-strings

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hello Kat,

>Look at the strtoks.e file in WIN Sockets Code for Mirc on the User
>Contributions page. It was written specifically for playing with the words
>in a sentence. You could:
>(UNtested code)
>
>wordnum = 1
>wordcount = numtok(text, 32)
>while ( wordnum < wordcount ) do
>   oneword = gettok(text,wordnum,32)
>   sprintf(1,oneword & : & space & findtok(text,oneword,0,32) & /n )
>   inc wordnum
>end while
>
>That will list each word with how many matches there are for it. There is
>also a wildmatch, a rem(ove)tok, a ins(ert)tok, etc for manipulating the
>words in the sentence.
>
>Kat

I need something that will ignore words and delimiters such as spaces and
cariage returns.
in this example: "the coyote ate the cat"
The segments "the c" and "te " would be repeated which doesn't considder
whole words. Does strtoks.e allow this sort of pattern
matching?

later,
Lewis Townsend
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu