Sorry forgot a subject.
-----Original Message-----
From: Terra Curtis [mailto:[email protected]]
Sent: Wednesday, October 19, 2005 1:22 PM
To: '[email protected]'
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/