Statalist


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

st: string functions


From   Miranda Kim <[email protected]>
To   [email protected]
Subject   st: string functions
Date   Mon, 26 Oct 2009 12:27:54 +0000

Hello,
I have a basic question on using string functions to do the following:
I have variable labels that have various units in brackets: (cm) (cm sq) etc. and I want to remove these from the label. How can I search a string for the portion between brackets (including the brackets) and replace this with a blank? For example if my variable area has the following label: "area (cm sq) of ..."
I want to replace the label with : "area of ..."
I have many variables so I want to automate this rather than having to type in individual labels...
I use stata v10
Many thanks!


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index