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

st: Date: Wed, 19 Oct 2005 13:22:23 -0400


From   "Terra Curtis" <[email protected]>
To   <[email protected]>
Subject   st: Date: Wed, 19 Oct 2005 13:22:23 -0400
Date   Wed, 19 Oct 2005 13:22:35 -0400 (EDT)

 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index