Re: Parsevar question
"chris.kevany" <[email protected]>
| Newsgroups | gmane.comp.windows.gui4cli |
|---|---|
| Message-ID | <[email protected]> |
I tried to find a full-proof solution because it's even more tricky.
Worse case, a series of records also could be all empty
which would give a string like
text = ',,,,,,,'
I tried this and it seems to work.
// Three different cases to comment/uncomment
Text = ',,,,,,,'
//Text = '2352,Tuesday,2,,Comm,,WhC,C3.68'
//Text = ',2352,Tuesday,2,,Comm,,WhC,C3.68,'
text = '"\#$text\"' // first add a single double quote at start and end
repvar text ',' '","'
say '$text'
ParseVar Text ","
say $$Parse.total
As far as I can see it always quotes all records, empty or not.
I might overlook still something, e.g. can records also contain
commas and or double quotes?
Chris
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/gui4cli/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/gui4cli/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/