1. Finding the end of string with escapes
- Posted by budmeister1 at JUNO.COM Mar 27, 2000
- 556 views
Hi everyone, I'm working on the CSV import portion of the EDS Toolbox, and a problem I'm running into is finding the end of a quote-delimited string that has escaped quotes in it. Example: "Uncle Bill says \"Go Gore!\"" I want the location of the last quote, and ignore the escaped quotes. I haven't been able to find a solution sofar... I had tried recursion, but somehow I got into an infinite loop :) Thanx in advance, ----->Buddy budmeister1 at juno.com http://tenbux.iwarp.com/
2. Re: Finding the end of string with escapes
- Posted by Bernie Ryan <xotron at BUFFNET.NET> Mar 27, 2000
- 558 views
- Last edited Mar 28, 2000
Set a flag when you see a escape character and save it temporarly If the next character is a quote then do what ever action you need for the escape/quote combination ( you didn't say what you are doing with it ) else output the escape character that you saved and the character that you just found and reset the flag. If you find a quote and you don't have a escape flaged then treat it as a real quote.
3. Re: Finding the end of string with escapes
- Posted by "Lucius L. Hilley III" <lhilley at CDC.NET> Mar 27, 2000
- 571 views
- Last edited Mar 28, 2000
> ---------------------- Information from the mail header ----------------------- > Sender: Euphoria Programming for MS-DOS <EUPHORIA at LISTSERV.MUOHIO.EDU> > Poster: budmeister1 at JUNO.COM > Subject: Finding the end of string with escapes > -------------------------------------------------------------------------- ----- > > Hi everyone, > > I'm working on the CSV import portion of the EDS Toolbox, and > a problem I'm running into is finding the end of a quote-delimited > string that has escaped quotes in it. > > Example: "Uncle Bill says \"Go Gore!\"" > > I want the location of the last quote, and ignore the escaped > quotes. I haven't been able to find a solution sofar... I had > tried recursion, but somehow I got into an infinite loop :) > > Thanx in advance, > > ----->Buddy > budmeister1 at juno.com > http://tenbux.iwarp.com/ > Use the search fuction on the Online message archive. I uploaded a CSV library some time back. The following is a URL that should take your right where you want to be. H=0&O=T&T=1 That is the message that I sent. The CSV.ZIP is at the bottom Lucius L. Hilley III lhilley at cdc.net +----------+--------------+--------------+ | Hollow | ICQ: 9638898 | AIM: LLHIII | | Horse +--------------+--------------+ | Software | http://www.cdc.net/~lhilley | +----------+-----------------------------+