Re: help with storing user input
- Posted by gertie at visionsix.com May 15, 2003
- 445 views
On 15 May 2003, at 2:37, gertie at visionsix.com wrote: > > On 15 May 2003, at 0:55, Jason Dube wrote: > > > > > Hello, > > What would be an efficient way of seperating words in a user inputted > > sentence? For example to break apart the words in a sentence. Im > > specifically > > trying to develop a GOOD algoritm to seperate words from user inputed > > sentence > > and store them as individual sequences.Like: user input:"mary had a little > > lamb" results:sequence 1st_sentence={"mary","had","a","little","lamb") Im > > having difficulties skipping whitespaces and converting to string > > > > how would euphoria do this:? > > parsedline = parse(input," ") You can also do: parsedline = parse(input," ,.;:'") or other punctuation. Problem with some is in math, like "1,234.5" , with the comma and period, or ""blah", he said sadly"" becomes {"blah","he","said","sadly"} which carries much less info. Kat