Re: Kat: parse() Question
- Posted by "Kat" <gertie at visionsix.com> Oct 14, 2004
- 508 views
On 13 Oct 2004, at 14:47, cklester wrote: > > > posted by: cklester <cklester at yahoo.com> > > No, I haven't checked the docs yet... :) > > If I have a string like this: > > "23 '17-5' 14 86" > > can I parse on the spaces and have the single-quoted items come back > as one item? No. > So, for instance, this string > > "One Two 'Three Four' Five 'Six Seven Eight'" > > would parse to > > { "One", "Two", "Three Four", "Five", "Six Seven Eight" } > > I'm sure you've got a function for that... Can you help me out here?! No. But that looks simple enough that finding the include to handle it would take longer than re-writing it occasionally. For instance, you could replace all the " " in the single-quotes with "_", and then parse would do what you want. In my experience, the way humans handle punctuation is riddled with errors. Parse(), or any function that calls it, can return the separators you specify, and i did that so i could recover from human error. In the return, the separators will be in their own lil sequence, where they were in relation to the real tokens. Kat