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]
Re: st: Macro parsing question
From
Phil Schumm <[email protected]>
To
Statalist Statalist <[email protected]>
Subject
Re: st: Macro parsing question
Date
Mon, 6 Jan 2014 20:42:14 -0600
On Jan 6, 2014, at 8:28 PM, Benjamin Villena <[email protected]> wrote:
> 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"?
loc m1 = regexr("`X'","X.+","")
loc m2 = regexr("`X'",".+X","")
-- Phil
*
* 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/