Bookmark and Share

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: RE: String match(strmatch) for case insensitive


From   Veeresh Thummadi <[email protected]>
To   [email protected]
Subject   Re: st: RE: String match(strmatch) for case insensitive
Date   Mon, 3 Feb 2014 12:02:15 -0500

Hi Tim

Thanks for sharing your code. I am also trying to use a local or
global macro. I will let you know if i find an efficient way to do
bulk string matching and generating variables

Thanks
Veeresh
Veeresh Thummadi
Research scientist
Stern School of business
New York University


On Mon, Feb 3, 2014 at 11:41 AM, Timothy King <[email protected]> wrote:
> Hi Veeresh,
>
> I'm sure other Stata users will suggest better solutions. However, it is simple to convert to lower case for one or more vars. For example, I just wrote the following loop in which title is the string variable(s):
>
> local title title
> foreach var of varlist title{
> gen title1=lower(`var')
> }
>
> Hope this helps,
>
> Dr Tim King
> Leeds University Business School
> ________________________________________
> From: [email protected] [[email protected]] On Behalf Of Veeresh Thummadi [[email protected]]
> Sent: 03 February 2014 16:33
> To: [email protected]
> Subject: st: String match(strmatch) for case insensitive
>
> Hi
>
> I am looking if i can make a strmatch for strings so that it can be
> case insensitive. I don't want to use the upper or lower case
> conversion as it appears to be tedious. Is there a way out for case
> insensitive strings?
>
> Thanks
> Veeresh
>
> Veeresh Thummadi
> Research scientist
> Stern School of business
> New York University
> *
> *   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/
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index