Parse text easily

Romain Robbes romain.robbes at lu.unisi.ch
Wed Aug 17 13:56:33 UTC 2005


'your string'  findTokens:  ' '

should parse it in words, then I guess it's fairly easy to compute  
the indices

Cheers,
     Romain

On Aug 17, 2005, at 2:30 PM, Damien Cassou wrote:

> Hi,
>
> I  have a  string which  I want  to parse  to search  words  and their
> position in the string.
>
> Something like this
>
> 'Smallwiki2 is powerfull, magritte too' parseForWords =>
> #( ('Smallwiki2' 1) ('is' 12) ('powerfull' 15) ('magritte' 26)  
> ('too' 35))
>
> or something like this. Is there any method doing this ?
>
> Thank you
>
> -- 
> Damien Cassou
>   pour le Software Composition Group a Berne
>
>




More information about the Squeak-dev mailing list