gunjang wrote

> hi everyone.. 
> can u tell me how can i clean up a variable value
> 
> for example i have a variable aa="hello everyone... i am gunjan"
> i want to know how can i delete the value between "everyone" and "am".
> i would really appreciate ur help..

Hi Gunjan,
The answer depends on what kind of 'rules' you have for cleaning up the
text. Do you simply want to delete words based on their position in the
text, or are you trying to determine the meaning of the text and 'prune' it
to a simplified version? If its the latter, then the answer is quite complex
- basically you are asking how to create a language parser.

If you just want to delete words based on their position in the text, then
you do it something like this

 aa="hello everyone... i am gunjan"
 firstWordToDelete = 2   -- keep first word
 LastWordToDelete = aa.word.count - 1  -- keep last word
 if LastWordToDelete >= firstWordToDelete then
   delete aa.word[firstWordToDelete..LastWordToDelete]
 else
  -- not enough words; the rule fails
 end if



Luke

  



-- 

__________________________________________________________________________
Mecca Medialight Pty Ltd

Mecca Medialight:                       Medialight Sound Studio:
111 Moor Street                         1 Bakehouse Lane
Fitzroy, Vic. 3065                      North Fitzroy, Vic. 3068
Tel +613 9416 2033                      Tel +613 9416 2033
Fax +613 9416 2055                      Fax +613 9416 2055

http://www.medialight.com.au
__________________________________________________________________________



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to