Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Macro parsing question
From
Benjamin Villena <[email protected]>
To
[email protected]
Subject
st: Macro parsing question
Date
Mon, 6 Jan 2014 23:28:49 -0300
Dear Statalist,
Suppose I have a macro X of this form:
local X part_oneXpart_two
How could I generally obtain two macros taking values "part_one" and
"part_two"?
So, in general, I need to count characters until the "X" and obtain a
word from the first character until the one just before "X". Then, I
need to obtain a word from the character just after "X" until the end.
Thanks
Benjamín
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/