Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Regular expressions with locals

From   Anthony Hong <anthony.hong@GMAIL.COM>
Subject   st: Regular expressions with locals
Date   Tue, 26 Jun 2012 00:33:32 -0400

Hello!  I have in a local macro a list of variables such as _Iphstat_1
from xi: logistic.  I would like to remove the _I from the beginning
and the _# from the end and create a new local with simply a string
"phstat = 1".

How might I go about doing this?

I realize this can be done with various string functions, but I'm
curious about the regex commands.
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index