Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: regexm()


From   "Terra Curtis" <terra.curtis@cambridgefinance.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: regexm()
Date   Wed, 19 Oct 2005 13:23:39 -0400

Sorry forgot a subject. 

-----Original Message-----
From: Terra Curtis [mailto:terra.curtis@cambridgefinance.com] 
Sent: Wednesday, October 19, 2005 1:22 PM
To: 'statalist@hsphsun2.harvard.edu'
Subject: 

 Dear Statalist,

 I am tring to use a combination of string functions to perform the
following.  I have a variable called drug which includes, for example,
something like "drugname" and "drugname capsules" and "drugname inhaler",
etc.  I want to set a dummy variable equal to 1 when drug=="drugname" or any
part of the string drug =="drugname."  I think -regexm- might be on the
right track, but I'm not sure exactly what is meant by a 'regular
expression.'  Suggestions?

Thanks,
Terra

*
*   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/



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