Re: help with storing user input

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

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu