Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: appling string functions across observations


From   Dalhia <[email protected]>
To   [email protected]
Subject   st: appling string functions across observations
Date   Thu, 4 Jun 2009 16:49:18 -0700 (PDT)

hi,

I have a list of two variables: name1 and name2.  I need to check if name2 occurs in any of the name1s. The regexm command in stata is perfect for what I want to do, but it checks only one string at a time, and I need it to somehow rotate over a whole list of names.  

Here is what I  have:  

name1  
ram solanki 
goel mehta
ashish gupta

name2
solanki
mehta

I need to be able to figure out that "solanki" and "mehta" in name2 occur in name1 observation1 and observation2.  

Any help will be much appreciated.
thanks
dalhia



      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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