Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Replace based on 1 word in middle of a sentence?


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Replace based on 1 word in middle of a sentence?
Date   Thu, 18 Oct 2007 13:48:15 +0100

replace var2 = "medecine" if strpos(var1, "medeci") 

Also, scan the list of functions to see what you 
are missing. 

Nick 
n.j.cox@durham.ac.uk 

Ziad El-Khatib

> i am used to Excel to use * sign before and after a word, when looking
> for a word in middle of sentence, for example
> 
> countif (A1:A10, "*medeci*")
> 
> anyway it is possible to use something similar in STATA for 
> command -replace-?
> like replace var2 = "medecine" if var1 == "*medeci*" ?

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