Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Need help with regular expression
From
Alison Connor <[email protected]>
To
[email protected]
Subject
Re: st: Need help with regular expression
Date
Sun, 17 Feb 2013 13:49:05 +0545
Hi Mike,
I am sure there is a much better way to do this, but until someone who
actually knows responds, could you try something like:
regexm(var, " us ") | regexm(var, " us&") | regexm(var, "^us ") ?
~Alison
On Sun, Feb 17, 2013 at 1:00 PM, Michael Stewart
<[email protected]> wrote:
> HI ,
>
> I am trying to use regexm command (regexm(var,"us"))to see if the
> values of variable have a particular string "us" like in "us thyroid"
> .Unfortunately , it is picking up "us" from other string values like
> "venous".If there a way to formulate command so that it can pick up
> only values where "us" is a separate word and not part of word like
> venous.
>
> Thank you ,
> Yours Sincerely,
> Mike.
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/