Thank you, Scott - I didn't have access to the paper manual and -help
tokenize- omitted that little fact. Your solution would work with my
first example but for more complex strings like my example: 1 2 3 | 4
5 6| 7 8 | 9 where I want the parse to give me the groups separated by
the "|" as tokens - not the individual items within the groups (that
comes later). For now I am going to do the following:
local test 1 2 3 | 4 5 6| 7 8 | 9
tokenize `"`test'"' , parse("|")
local i = 1
while `"`i'"' != "" {
tokenize `"`i'"'
local j = 1
while `"`j'"' != "" {
do something with j
local ++j
}
local ++i
macro shift // this advances over the token and allows i to progress 1,2,3
}
I still think tokenize *should* have a noparsechar option that does
not save the parsing characters (Stata, are you listening?).
DCE
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/