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

st: RE: regexm()

From   "Terra Curtis" <>
To   <>
Subject   st: RE: regexm()
Date   Wed, 19 Oct 2005 13:23:39 -0400

Sorry forgot a subject. 

-----Original Message-----
From: Terra Curtis [] 
Sent: Wednesday, October 19, 2005 1:22 PM
To: ''

 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?


*   For searches and help try:

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